d4d300d0e9
Note: all tests passed, but I haven't tested this build in real life (opposite to my master branch). Don't remember about critical issue — http://youtrack.jetbrains.com/issue/KT-2154 Fix for this issue is not included in this patch (because unrelated). Fix for it and for all other unrelated changes will be opened as separated pull-requests.
26 lines
427 B
Kotlin
26 lines
427 B
Kotlin
package foo
|
|
|
|
class Test() {
|
|
var a = 0
|
|
}
|
|
|
|
var Test.b : Int
|
|
get() = a * 3
|
|
set(c : Int) {
|
|
a = c - 1
|
|
}
|
|
|
|
val Test.d : Int = 44
|
|
|
|
fun box() : Boolean {
|
|
val c = Test()
|
|
if (c.a != 0) return false;
|
|
if (c.b != 0) return false;
|
|
c.a = 3;
|
|
if (c.b != 9) return false;
|
|
c.b = 10;
|
|
if (c.a != 9) return false;
|
|
if (c.b != 27) return false;
|
|
if (c.d != 44) return false;
|
|
return true;
|
|
} |