Fix for loop processing in luajc compiler code generator for lua 5.3 bytecodes

This commit is contained in:
James Roseborough
2012-09-18 14:17:00 +00:00
parent ef94aa3abb
commit 4bf132c01e
9 changed files with 89 additions and 43 deletions

View File

@@ -94,6 +94,15 @@ public class FragmentsTest extends TestSuite {
"return b" );
}
public void testSimpleForloop() {
runFragment( LuaValue.valueOf(77),
"for n,p in ipairs({77}) do\n"+
" print('n,p',n,p)\n"+
" return p\n"+
"end\n");
}
public void testForloopParamUpvalues() {
runFragment( LuaValue.varargsOf(new LuaValue[] {
LuaValue.valueOf(77),