mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 14:18:42 +01:00
10 lines
233 B
Plaintext
10 lines
233 B
Plaintext
class Foo {
|
|
write { IO.write(_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
|