7de2013a3e
#KT-3856 Fixed
33 lines
458 B
Kotlin
Vendored
33 lines
458 B
Kotlin
Vendored
fun foo(<!UNUSED_PARAMETER!>init<!>: A.() -> Unit) { }
|
|
|
|
class A {
|
|
var x: Int = 0
|
|
companion object {
|
|
val f = foo() {
|
|
x = 1
|
|
}
|
|
}
|
|
}
|
|
|
|
class B(val a: String) {
|
|
fun f() = 0
|
|
companion object {
|
|
fun B.bar() = a + f()
|
|
}
|
|
}
|
|
|
|
open class C {
|
|
fun bar() {}
|
|
}
|
|
|
|
class E: C() {
|
|
|
|
class D {
|
|
init {
|
|
with(C()) {
|
|
bar()
|
|
this.bar()
|
|
}
|
|
}
|
|
}
|
|
} |