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.
27 lines
395 B
Kotlin
Vendored
27 lines
395 B
Kotlin
Vendored
interface A {
|
|
fun foo()
|
|
}
|
|
|
|
interface B {
|
|
fun bar()
|
|
}
|
|
|
|
fun B.b() {
|
|
object : A {
|
|
override fun foo() {
|
|
this@b.bar()
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
fun test() {
|
|
fun <T> without(f: T.() -> Unit): Unit = (null!!).f<!UNREACHABLE_CODE!>()<!>
|
|
without<B>() b@ {
|
|
object : A {
|
|
override fun foo() {
|
|
this@b.bar()
|
|
}
|
|
}
|
|
}
|
|
} |