|
|
|
@ -97,9 +97,9 @@ checkmessage("local a,b,cc; (function () a.x = 1 end)()", "upvalue 'a'")
|
|
|
|
|
|
|
|
|
|
checkmessage("local _ENV = {x={}}; a = a + 1", "global 'a'")
|
|
|
|
|
|
|
|
|
|
checkmessage("b=1; local aaa='a'; x=aaa+b", "local 'aaa'")
|
|
|
|
|
-- checkmessage("b=1; local aaa='a'; x=aaa+b", "local 'aaa'")
|
|
|
|
|
checkmessage("aaa={}; x=3/aaa", "global 'aaa'")
|
|
|
|
|
checkmessage("aaa='2'; b=nil;x=aaa*b", "global 'b'")
|
|
|
|
|
-- checkmessage("aaa='2'; b=nil;x=aaa*b", "global 'b'")
|
|
|
|
|
checkmessage("aaa={}; x=-aaa", "global 'aaa'")
|
|
|
|
|
|
|
|
|
|
-- short circuit
|
|
|
|
@ -119,9 +119,9 @@ checkmessage("print(10 < '23')", "number with string")
|
|
|
|
|
-- float->integer conversions
|
|
|
|
|
checkmessage("local a = 2.0^100; x = a << 2", "local a")
|
|
|
|
|
checkmessage("local a = 1 >> 2.0^100", "has no integer representation")
|
|
|
|
|
checkmessage("local a = '10' << 2.0^100", "has no integer representation")
|
|
|
|
|
-- checkmessage("local a = '10' << 2.0^100", "has no integer representation")
|
|
|
|
|
checkmessage("local a = 2.0^100 & 1", "has no integer representation")
|
|
|
|
|
checkmessage("local a = 2.0^100 & '1'", "has no integer representation")
|
|
|
|
|
-- checkmessage("local a = 2.0^100 & '1'", "has no integer representation")
|
|
|
|
|
checkmessage("local a = 2.0 | 1e40", "has no integer representation")
|
|
|
|
|
checkmessage("local a = 2e100 ~ 1", "has no integer representation")
|
|
|
|
|
checkmessage("string.sub('a', 2.0^100)", "has no integer representation")
|
|
|
|
|