[LL FIR] do not crash on attempt to resolve class initializer in case of class clash
^KT-61788 Fixed
This commit is contained in:
committed by
Space Team
parent
e3ad946d23
commit
c9df6aff5f
+11
@@ -0,0 +1,11 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtClassInitializer
|
||||
|
||||
package one.two
|
||||
|
||||
class A
|
||||
typealias Foo = A
|
||||
class Foo {
|
||||
<expr>init {
|
||||
val i = 1
|
||||
}</expr>
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
KT element: KtClassInitializer
|
||||
FIR element: FirAnonymousInitializerImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
init {
|
||||
[ResolvedTo(RAW_FIR)] lval i: R|kotlin/Int| = Int(1)
|
||||
}
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] initializerConflict.kt
|
||||
package one.two
|
||||
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|one/two/A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final [ResolvedTo(SUPER_TYPES)] typealias Foo = R|one/two/A|
|
||||
public final [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Foo] constructor(): R|one/two/Foo| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
init {
|
||||
[ResolvedTo(RAW_FIR)] lval i: R|kotlin/Int| = Int(1)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user