mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 06:08:41 +01:00
Add a clearer error message for forward declared lowercase variables (#699)
* Add better error messaging for forward referenced top level variables, see #467 * add test case
This commit is contained in:
committed by
GitHub
parent
fc7bd1c78f
commit
3eb4ac1419
5
test/language/nonlocal/localname_forward_declare.wren
Normal file
5
test/language/nonlocal/localname_forward_declare.wren
Normal file
@ -0,0 +1,5 @@
|
||||
if (false) {
|
||||
System.print(a)
|
||||
}
|
||||
|
||||
var a = 123 // expect error: Error at '123': Variable 'a' referenced before this definition (first use at line 2).
|
||||
Reference in New Issue
Block a user