22 lines
239 B
Kotlin
Vendored
22 lines
239 B
Kotlin
Vendored
package foo
|
|
|
|
var c = 0
|
|
|
|
class A() {
|
|
var p = 0;
|
|
init {
|
|
c++;
|
|
}
|
|
}
|
|
|
|
fun box(): Boolean {
|
|
++A().p
|
|
if (c != 1) {
|
|
return false;
|
|
}
|
|
--A().p
|
|
if (c != 2) {
|
|
return false;
|
|
}
|
|
return true
|
|
} |