1071919706
Also remove any mentions of NewInference, and rename some tests.
22 lines
269 B
Kotlin
Vendored
22 lines
269 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
fun interface KRunnable {
|
|
fun invoke()
|
|
}
|
|
|
|
fun runTwice(r: KRunnable) {
|
|
r.invoke()
|
|
r.invoke()
|
|
}
|
|
|
|
class A() {
|
|
fun f() {}
|
|
}
|
|
|
|
fun box(): String {
|
|
var x = 0
|
|
runTwice({ x++; A() }()::f)
|
|
if (x != 1) return "Fail"
|
|
return "OK"
|
|
}
|