failures+=test_luacompexec1("function test(); local x: integer = 1; return function (j) x = j; return x; end; end; fn = test(); return fn('55')",55);
failures+=test_luacompexec1("ravi.auto(true); function arrayaccess (); local x: integer[] = {5}; return x[1]; end; assert(ravi.compile(arrayaccess)); return arrayaccess()",5);
failures+=test_luacompexec1("ravi.auto(true); function cannotload (msg, a,b); assert(not a and string.find(b, msg)); end; ravi.compile(cannotload); return 1",1);
@ -328,6 +190,5 @@ int main()
failures+=test_luacomp1("local a=1; if a==0 then; a = 2; else a=3; end;");
failures+=test_luacomp1("local f = function(); return; end; local d:number = 5.0; d = f(); return d");
failures+=test_luacomp1("local f = function(); return; end; local d = 5.0; d = f(); return d");