aboutsummaryrefslogtreecommitdiff
path: root/testes/errors.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-04-04 16:31:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-04-04 16:31:24 -0300
commit8004798b0374744208b102bb4cbcf12f904ea120 (patch)
tree0809ccedaa52f187505121c3b85029d7496465b9 /testes/errors.lua
parent5ca1075b714e825006e8ba4f8e7ea5544879bb41 (diff)
downloadlua-8004798b0374744208b102bb4cbcf12f904ea120.tar.gz
lua-8004798b0374744208b102bb4cbcf12f904ea120.tar.bz2
lua-8004798b0374744208b102bb4cbcf12f904ea120.zip
Fixed wrong error message in 'return math.seed(0)'
Bug introduced in commit 28d829c8: OP_TAILCALL might raise an error without saving 'pc'. (This commit also fixes a detail in 'testes/uf8.lua'.)
Diffstat (limited to 'testes/errors.lua')
-rw-r--r--testes/errors.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/testes/errors.lua b/testes/errors.lua
index 74975e31..0b12410e 100644
--- a/testes/errors.lua
+++ b/testes/errors.lua
@@ -99,6 +99,10 @@ assert(not string.find(doit"a={13}; local bbbb=1; a[bbbb](3)", "'bbbb'"))
99checkmessage("a={13}; local bbbb=1; a[bbbb](3)", "number") 99checkmessage("a={13}; local bbbb=1; a[bbbb](3)", "number")
100checkmessage("a=(1)..{}", "a table value") 100checkmessage("a=(1)..{}", "a table value")
101 101
102-- tail calls
103checkmessage("local a={}; return a.bbbb(3)", "field 'bbbb'")
104checkmessage("a={}; do local a=1 end; return a:bbbb(3)", "method 'bbbb'")
105
102checkmessage("a = #print", "length of a function value") 106checkmessage("a = #print", "length of a function value")
103checkmessage("a = #3", "length of a number value") 107checkmessage("a = #3", "length of a number value")
104 108