feat: report undefined variable errors on the line where they are used
Store the line number of first use in implicitly declared variables as a numeric value, then synthesize a token at that line when reporting the error, ensuring bounded error message length even for pathologically long variable names.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
var fn = Fn.new {
|
||||
System.print(Foo)
|
||||
System.print(Bar)
|
||||
System.print(Foo) // expect error
|
||||
System.print(Bar) // expect error
|
||||
}
|
||||
|
||||
// expect error line 6
|
||||
Reference in New Issue
Block a user