aboutsummaryrefslogtreecommitdiff
path: root/testes/goto.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-12 11:42:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-12 11:42:45 -0300
commit7dc6aae29057c9dc4588f780c7abd72a62ff4c8e (patch)
tree8ebcbfb45b7f477162bf52854936f35200b72321 /testes/goto.lua
parent5b1ab8efdcb7b48cab8148a407266c467d57114c (diff)
downloadlua-7dc6aae29057c9dc4588f780c7abd72a62ff4c8e.tar.gz
lua-7dc6aae29057c9dc4588f780c7abd72a62ff4c8e.tar.bz2
lua-7dc6aae29057c9dc4588f780c7abd72a62ff4c8e.zip
Correct line in error message for constant function
Diffstat (limited to 'testes/goto.lua')
-rw-r--r--testes/goto.lua7
1 files changed, 7 insertions, 0 deletions
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
342 global foo <const>; 342 global foo <const>;
343 function foo (x) return end -- ERROR: foo is read-only 343 function foo (x) return end -- ERROR: foo is read-only
344 ]], "assign to const variable 'foo'") 344 ]], "assign to const variable 'foo'")
345
346 checkerr([[
347 global foo <const>;
348 function foo (x) -- ERROR: foo is read-only
349 return
350 end
351 ]], "%:2%:") -- correct line in error message
345 352
346end 353end
347 354