Retoor software development Projects Research SearchXNG
Register Sign In

5 lines
148 B
Plaintext
Raw Normal View History

feat: add clearer error message for forward-referenced lowercase module variables Add a new error code (-3) from wrenDefineVariable to detect when a lowercase (local-style) module variable is referenced before its definition. The compiler now reports the line of the first use, improving diagnostics for forward-declared top-level variables.
2019-10-01 05:30:27 +02:00
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 Copy Permalink
4954c0b4f2
wren/test/language/nonlocal/localname_forward_declare.wren
Response time: 44ms
Mail Licenses API