New failing test case involving do/end blocks and upvalues.

This commit is contained in:
Ian Farmer
2008-02-07 18:56:17 +00:00
parent 1eb969f84d
commit cb6ce20dde
2 changed files with 19 additions and 0 deletions

View File

@@ -163,6 +163,11 @@ public class LuaJTest extends TestCase {
public void testUpvalues2() throws IOException, InterruptedException { public void testUpvalues2() throws IOException, InterruptedException {
runTest( "upvalues2" ); runTest( "upvalues2" );
} }
public void testUpvalues3() throws IOException, InterruptedException {
runTest( "upvalues3" );
}
//*/ //*/
private void runTest( String testName ) throws IOException, InterruptedException { private void runTest( String testName ) throws IOException, InterruptedException {

View File

@@ -0,0 +1,14 @@
local f
do
local x = 10
function g()
print(x, f())
end
end
function f()
return 20
end
g()