Files
kotlin-fork/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.fir.kt
T
Brian Norman e10a9263d0 [FIR] Only inherit class type parameters if inner class
Nested classes which are not inner class should not be able to access
type parameters of the outer class. Make sure access is not available
when resolving super types.

#KT-54748 Fixed
2023-05-31 16:25:51 +00:00

27 lines
591 B
Kotlin
Vendored

open class SomeClass<T>
class TestSome<P> {
companion object : SomeClass<<!UNRESOLVED_REFERENCE!>P<!>>() {
}
}
class Test {
companion object : <!UNRESOLVED_REFERENCE!>InnerClass<!>() {
val a = object: <!UNRESOLVED_REFERENCE!>InnerClass<!>() {
}
fun more(): InnerClass {
val b = <!RESOLUTION_TO_CLASSIFIER!>InnerClass<!>()
val testVal = <!UNRESOLVED_REFERENCE!>inClass<!>
<!UNRESOLVED_REFERENCE!>foo<!>()
return b
}
}
val inClass = 12
fun foo() {}
open inner class InnerClass
}