From 02bab9fc258fe1cbc6088b1bd61193499d058eff Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 8 Feb 2023 14:15:41 -0300 Subject: Bug: Wrong line in error message for arith. errors It also causes 'L->top' to be wrong when the error happens, triggering an 'assert'. --- testes/errors.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'testes') 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 end end]], 5) + +-- bug in 5.4.0 +lineerror([[ + local a = 0 + local b = 1 + local c = b % a +]], 3) + do -- Force a negative estimate for base line. Error in instruction 2 -- (after VARARGPREP, GETGLOBAL), with first absolute line information -- cgit v1.2.3-55-g6feb