diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2026-04-13 14:06:23 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2026-04-13 14:06:23 -0300 |
| commit | d0bd25d2e7fb393a6d0a73645a099f9c3b9cc0a8 (patch) | |
| tree | 9ce68f9e031b4041683852af0a3ec28a25d05250 /testes | |
| parent | 29cf284089d543408d726440a3f1acaecdf73636 (diff) | |
| download | lua-d0bd25d2e7fb393a6d0a73645a099f9c3b9cc0a8.tar.gz lua-d0bd25d2e7fb393a6d0a73645a099f9c3b9cc0a8.tar.bz2 lua-d0bd25d2e7fb393a6d0a73645a099f9c3b9cc0a8.zip | |
Better error messages for vararg-table fields
Diffstat (limited to 'testes')
| -rw-r--r-- | testes/errors.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/testes/errors.lua b/testes/errors.lua index c9d85099..c82d5b3b 100644 --- a/testes/errors.lua +++ b/testes/errors.lua | |||
| @@ -159,6 +159,9 @@ assert(not string.find(doit"aaa={13}; local bbbb=1; aaa[bbbb](3)", "'bbbb'")) | |||
| 159 | checkmessage("aaa={13}; local bbbb=1; aaa[bbbb](3)", "number") | 159 | checkmessage("aaa={13}; local bbbb=1; aaa[bbbb](3)", "number") |
| 160 | checkmessage("aaa=(1)..{}", "a table value") | 160 | checkmessage("aaa=(1)..{}", "a table value") |
| 161 | 161 | ||
| 162 | checkmessage("local function foo (...t) return t.xx + 1 end; foo()", | ||
| 163 | "field 'xx'") | ||
| 164 | |||
| 162 | -- bug in 5.4.6 | 165 | -- bug in 5.4.6 |
| 163 | checkmessage("a = {_ENV = {}}; print(a._ENV.x + 1)", "field 'x'") | 166 | checkmessage("a = {_ENV = {}}; print(a._ENV.x + 1)", "field 'x'") |
| 164 | 167 | ||
