KT-3856 Wrong inner class inaccessible diagnostic for extension to outer class
#KT-3856 Fixed
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user