2014-01-19 21:01:51 +00:00
|
|
|
class Foo {
|
|
|
|
|
static initialize { __field = "Foo field" }
|
|
|
|
|
|
|
|
|
|
static closeOverGet {
|
2015-07-10 16:18:22 +00:00
|
|
|
return Fn.new { __field }
|
2014-01-19 21:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static closeOverSet {
|
2015-07-10 16:18:22 +00:00
|
|
|
return Fn.new { __field = "new value" }
|
2014-01-19 21:01:51 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Foo.initialize
|
2015-09-15 14:46:09 +00:00
|
|
|
System.print(Foo.closeOverGet.call()) // expect: Foo field
|
2015-02-27 07:08:36 +00:00
|
|
|
Foo.closeOverSet.call()
|
2015-09-15 14:46:09 +00:00
|
|
|
System.print(Foo.closeOverGet.call()) // expect: new value
|