mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
@ -1,4 +1,5 @@
|
||||
class Foo {
|
||||
construct new() {}
|
||||
write { IO.print(_field) }
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
class Foo {
|
||||
construct new() {}
|
||||
|
||||
set(a, b, c, d, e) {
|
||||
_a = a
|
||||
_b = b
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
class Outer {
|
||||
construct new() {}
|
||||
|
||||
method {
|
||||
_field = "outer"
|
||||
IO.print(_field) // expect: outer
|
||||
|
||||
class Inner {
|
||||
construct new() {}
|
||||
|
||||
method {
|
||||
_field = "inner"
|
||||
IO.print(_field) // expect: inner
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
class Foo {
|
||||
construct new() {}
|
||||
write { IO.print(_field) } // Compile a use of the field...
|
||||
init { _field = "value" } // ...before an assignment to it.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user