Report undefined variable errors on the line where they are used.

This also more importantly ensures the error message for one has a
bounded length even if the variable name is pathologically long.
This commit is contained in:
Bob Nystrom
2016-03-16 08:00:28 -07:00
parent 1478d6b7e2
commit a6739819b2
4 changed files with 24 additions and 16 deletions
+2 -4
View File
@@ -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