73799e2c3c
It's done with similar constructions where possible trying to preserve intended behavior. Some usages are removed because they test exactly the feature that we are going to drop soon.
22 lines
310 B
Kotlin
Vendored
22 lines
310 B
Kotlin
Vendored
package foo
|
|
|
|
class M() {
|
|
var m = 0
|
|
|
|
fun eval() {
|
|
var d = {
|
|
var c = fun Int.(): Int = this + 3
|
|
m += 3.c()
|
|
}
|
|
d();
|
|
}
|
|
}
|
|
|
|
fun box(): Boolean {
|
|
var a = M()
|
|
if (a.m != 0) return false;
|
|
a.eval()
|
|
if (a.m != 6) return false;
|
|
|
|
return true;
|
|
} |