Fix upvalue processing.

This commit is contained in:
James Roseborough
2009-11-04 06:33:34 +00:00
parent 1b66a91c95
commit 7cc18046ab
2 changed files with 24 additions and 17 deletions

View File

@@ -57,6 +57,20 @@ public class FragmentsTest extends TestCase {
fail(e.toString());
}
}
public void testForloopParamUpvalues() {
runFragment( LuaValue.varargsOf(new LuaValue[] {
LuaValue.valueOf(77),
LuaValue.valueOf(1) } ),
"for n,p in ipairs({77}) do\n"+
" print('n,p',n,p)\n"+
" foo = function()\n"+
" return p,n\n"+
" end\n"+
" return foo()\n"+
"end\n");
}
public void testVarVarargsUseArg() {
runFragment( LuaValue.varargsOf( new LuaValue[] {