Files
wren/test/field/use_before_set.wren
T
Bob Nystrom b979272305 Clean up text handling a bit:
- Rename IO.write -> IO.print.
- Make IO.write not print a newline.
- Support \u Unicode escapes in strings.
2014-01-05 12:27:12 -08:00

10 lines
233 B
Plaintext

class Foo {
write { IO.print(_field) } // Compile a use of the field...
init { _field = "value" } // ...before an assignment to it.
}
var foo = new Foo
// But invoke them in the right order.
foo.init
foo.write // expect: value