mirror of
https://github.com/lua/lua.git
synced 2026-09-02 00:18:14 +00:00
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.
This commit is contained in:
@@ -137,6 +137,10 @@ checkmessage("aaa=(1)..{}", "a table value")
|
||||
-- bug in 5.4.6
|
||||
checkmessage("a = {_ENV = {}}; print(a._ENV.x + 1)", "field 'x'")
|
||||
|
||||
-- a similar bug in 5.4.7, since 5.4.0
|
||||
checkmessage("print(('_ENV').x + 1)", "field 'x'")
|
||||
|
||||
|
||||
_G.aaa, _G.bbbb = nil
|
||||
|
||||
-- calls
|
||||
|
||||
Reference in New Issue
Block a user