Hi, I've just tried to compile and run you code and it worked just fine.
My test script looked like this:
local x = Vec2()
x.set(1,2);
ciao
Alberto