From 7dc6aae29057c9dc4588f780c7abd72a62ff4c8e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 12 May 2025 11:42:45 -0300 Subject: Correct line in error message for constant function --- testes/goto.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'testes/goto.lua') diff --git a/testes/goto.lua b/testes/goto.lua index b41399ff..59713dd7 100644 --- a/testes/goto.lua +++ b/testes/goto.lua @@ -342,6 +342,13 @@ do global foo ; function foo (x) return end -- ERROR: foo is read-only ]], "assign to const variable 'foo'") + + checkerr([[ + global foo ; + function foo (x) -- ERROR: foo is read-only + return + end + ]], "%:2%:") -- correct line in error message end -- cgit v1.2.3-55-g6feb