Improve bytecode generation.

This commit is contained in:
James Roseborough
2010-08-10 14:55:32 +00:00
parent afa2d5fd09
commit 6b379f9fe8
4 changed files with 47 additions and 19 deletions

View File

@@ -442,5 +442,16 @@ public class FragmentsTest extends TestSuite {
"end\n" +
"return bar()[1]");
}
public void testReadOnlyAndReadWriteUpvalues() {
runFragment( LuaValue.varargsOf( new LuaValue[] { LuaValue.valueOf(333), LuaValue.valueOf(222) } ),
"local a = 111\n" +
"local b = 222\n" +
"local c = function()\n"+
" a = a + b\n" +
" return a,b\n"+
"end\n" +
"return c()\n" );
}
}
}