diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-15 15:14:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-15 15:14:56 -0300 |
commit | d1ee2a4deb06a335b9ff99530917b828a7ebe3e5 (patch) | |
tree | 9540c7858a7116a0299652d38deeafdd07d23e25 /testes/errors.lua | |
parent | 3fe7be956f23385aa1950dc31e2f25127ccfc0ea (diff) | |
download | lua-d1ee2a4deb06a335b9ff99530917b828a7ebe3e5.tar.gz lua-d1ee2a4deb06a335b9ff99530917b828a7ebe3e5.tar.bz2 lua-d1ee2a4deb06a335b9ff99530917b828a7ebe3e5.zip |
Bug: Bad error message with fields of string _ENV
Errors with fields of the string _ENV (e.g., ("_ENV").u + 1) report
the error as comming from a global.
Diffstat (limited to '')
-rw-r--r-- | testes/errors.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testes/errors.lua b/testes/errors.lua index 80d91a92..15401b4f 100644 --- a/testes/errors.lua +++ b/testes/errors.lua | |||
@@ -137,6 +137,10 @@ checkmessage("aaa=(1)..{}", "a table value") | |||
137 | -- bug in 5.4.6 | 137 | -- bug in 5.4.6 |
138 | checkmessage("a = {_ENV = {}}; print(a._ENV.x + 1)", "field 'x'") | 138 | checkmessage("a = {_ENV = {}}; print(a._ENV.x + 1)", "field 'x'") |
139 | 139 | ||
140 | -- a similar bug in 5.4.7, since 5.4.0 | ||
141 | checkmessage("print(('_ENV').x + 1)", "field 'x'") | ||
142 | |||
143 | |||
140 | _G.aaa, _G.bbbb = nil | 144 | _G.aaa, _G.bbbb = nil |
141 | 145 | ||
142 | -- calls | 146 | -- calls |