diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-02-08 14:15:41 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-02-08 14:15:41 -0300 |
| commit | 02bab9fc258fe1cbc6088b1bd61193499d058eff (patch) | |
| tree | a88b03d4c84ac0d734d528f39f4fd9ead8819432 /testes | |
| parent | 5e08b41567c5723c9f599d02a7511aa398f7c646 (diff) | |
| download | lua-02bab9fc258fe1cbc6088b1bd61193499d058eff.tar.gz lua-02bab9fc258fe1cbc6088b1bd61193499d058eff.tar.bz2 lua-02bab9fc258fe1cbc6088b1bd61193499d058eff.zip | |
Bug: Wrong line in error message for arith. errors
It also causes 'L->top' to be wrong when the error happens,
triggering an 'assert'.
Diffstat (limited to 'testes')
| -rw-r--r-- | testes/errors.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testes/errors.lua b/testes/errors.lua index cf0ab526..bf6f389d 100644 --- a/testes/errors.lua +++ b/testes/errors.lua | |||
| @@ -444,6 +444,14 @@ if not b then | |||
| 444 | end | 444 | end |
| 445 | end]], 5) | 445 | end]], 5) |
| 446 | 446 | ||
| 447 | |||
| 448 | -- bug in 5.4.0 | ||
| 449 | lineerror([[ | ||
| 450 | local a = 0 | ||
| 451 | local b = 1 | ||
| 452 | local c = b % a | ||
| 453 | ]], 3) | ||
| 454 | |||
| 447 | do | 455 | do |
| 448 | -- Force a negative estimate for base line. Error in instruction 2 | 456 | -- Force a negative estimate for base line. Error in instruction 2 |
| 449 | -- (after VARARGPREP, GETGLOBAL), with first absolute line information | 457 | -- (after VARARGPREP, GETGLOBAL), with first absolute line information |
