Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectSuperConstructorArguments.kt
T
Mikhail Glukhikh f85fc47383 FIR: introduce separate companion object resolve context
Before this commit, during the resolve of companion objects we used
the same context than for any nested class. However, during companion
object resolve we should not have companion object receiver itself
accessible in any case (in particular, it should not be accessible
in constructor). So in this commit we introduced separate context
for this purpose.
2021-01-18 08:32:06 +03:00

21 lines
549 B
Kotlin
Vendored

// FIR_IDENTICAL
open class S(val a: Any, val b: Any, val c: Any) {}
interface A {
companion object : S(<!UNRESOLVED_REFERENCE!>prop1<!>, <!UNRESOLVED_REFERENCE!>prop2<!>, <!UNRESOLVED_REFERENCE!>func<!>()) {
val prop1 = 1
val prop2: Int
get() = 1
fun func() {}
}
}
class B {
companion object : S(<!UNRESOLVED_REFERENCE!>prop1<!>, <!UNRESOLVED_REFERENCE!>prop2<!>, <!UNRESOLVED_REFERENCE!>func<!>()) {
val prop1 = 1
val prop2: Int
get() = 1
fun func() {}
}
}