[LL FIR] resolve class before constructor
This is required to have stable resolution order to avoid concurrent modifications and correct resolution context. This also fixes KT-63700 as a super call expands only during body resolution in the case of secondary constructor ^KT-63042 ^KT-63700 Fixed
This commit is contained in:
committed by
Space Team
parent
e3d91741ca
commit
5183019cb8
Vendored
+2
-2
@@ -29,9 +29,9 @@ FILE: [ResolvedTo(IMPORTS)] contextReceiver.kt
|
||||
|
||||
}
|
||||
context(R|test/Base|)
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
|
||||
super<R|test/Base|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -24,12 +24,12 @@ Tower Data Context:
|
||||
FirValueParameterSymbol name: R|kotlin/String| = String(name)
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter_initializerExpression.kt
|
||||
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
|
||||
public open [ResolvedTo(ANNOTATION_ARGUMENTS)] class Base : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Base| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Nested : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Base.Nested| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
@@ -40,9 +40,9 @@ FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter_initializerExpression.kt
|
||||
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] name: R|kotlin/String| = String(name)): R|test/Child| {
|
||||
super<R|test/Base|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -24,12 +24,12 @@ Tower Data Context:
|
||||
FirValueParameterSymbol name: R|kotlin/String|
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter_typeRef.kt
|
||||
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
|
||||
public open [ResolvedTo(ANNOTATION_ARGUMENTS)] class Base : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Base| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Nested : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Base.Nested| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
@@ -37,9 +37,9 @@ FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter_typeRef.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] name: R|kotlin/String|): R|test/Child| {
|
||||
super<R|test/Base|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -37,7 +37,7 @@ FILE: [ResolvedTo(IMPORTS)] superTypeCallArgumentsExpression.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] primaryConstructorParameter: R|test/Base.Nested|): R|test/Child| {
|
||||
super<R|test/Base|>(R|<local>/primaryConstructorParameter|)
|
||||
}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ FILE: [ResolvedTo(IMPORTS)] superTypeCallArgumentsTypeRef.kt
|
||||
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] T> materialize(): R|T| {
|
||||
^materialize TODO#()
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] primaryConstructorParameter: R|test/Base.Nested|): R|test/Child| {
|
||||
super<R|test/Base|>(R|test/materialize|<R|test/Base.Nested|>())
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -28,9 +28,9 @@ FILE: [ResolvedTo(IMPORTS)] superTypeCallee.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
|
||||
super<R|test/Base|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -28,9 +28,9 @@ FILE: [ResolvedTo(IMPORTS)] superTypeCalleeGenerics.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base<kotlin/Any>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base<kotlin/Any>| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
|
||||
super<R|test/Base<kotlin/Any>|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -28,9 +28,9 @@ FILE: [ResolvedTo(IMPORTS)] superTypeRef.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
|
||||
super<R|test/Base|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+2
-2
@@ -28,9 +28,9 @@ FILE: [ResolvedTo(IMPORTS)] superTypeRefGenerics.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Child : R|test/Base<kotlin/Any>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Child : R|test/Base<kotlin/Any>| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Child| {
|
||||
super<R|test/Base<kotlin/Any>|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ FILE: [ResolvedTo(IMPORTS)] file.kt
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun other(): R|kotlin/Int| {
|
||||
^other String(foo).R|kotlin/String.length|
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Foo : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Foo| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
@@ -33,4 +33,4 @@ FILE: [ResolvedTo(IMPORTS)] file.kt
|
||||
<Unresolved name: require>#(==(R|test/other|(), Int(3)))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -19,7 +19,7 @@ Tower Data Context:
|
||||
Type: Foo
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter.kt
|
||||
public final [ResolvedTo(STATUS)] class Foo : R|kotlin/Any| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Foo : R|kotlin/Any| {
|
||||
public [ResolvedTo(ANNOTATION_ARGUMENTS)] constructor([ResolvedTo(ANNOTATION_ARGUMENTS)] a: R|kotlin/String| = LAZY_EXPRESSION, [ResolvedTo(ANNOTATION_ARGUMENTS)] b: R|kotlin/Int| = LAZY_EXPRESSION, [ResolvedTo(ANNOTATION_ARGUMENTS)] c: R|kotlin/Long| = LAZY_EXPRESSION): R|Foo| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
@@ -33,4 +33,4 @@ FILE: [ResolvedTo(IMPORTS)] primaryConstructorParameter.kt
|
||||
public final [ResolvedTo(STATUS)] val c: R|kotlin/Long| = R|<local>/c|
|
||||
public [ResolvedTo(STATUS)] get(): R|kotlin/Long|
|
||||
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ FILE: [ResolvedTo(IMPORTS)] topLevel.kts
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val before_Val: R|kotlin/Int| = Int(10)
|
||||
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
|
||||
|
||||
public final [ResolvedTo(STATUS)] class Before_OtherClass : R|kotlin/Any| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Before_OtherClass : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Before_OtherClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,9 +20,9 @@ Tower Data Context:
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromContextReceiver.kt
|
||||
context(R|MyParam|)
|
||||
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Outer<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -31,13 +31,13 @@ Tower Data Context:
|
||||
FirTypeParameterSymbol T : R|MyParam|
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromInner_typeBound.kt
|
||||
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Outer<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(STATUS)] class Inner<[ResolvedTo(STATUS)] T : R|MyParam|, [ResolvedTo(STATUS)] Outer(MyParam)> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] test/Outer<MyParam>.constructor<[ResolvedTo(STATUS)] T : R|MyParam|>(): R|test/Outer.Inner<T, MyParam>| {
|
||||
public final inner [ResolvedTo(ANNOTATION_ARGUMENTS)] class Inner<[ResolvedTo(ANNOTATION_ARGUMENTS)] T : R|MyParam|, [ResolvedTo(ANNOTATION_ARGUMENTS)] Outer(MyParam)> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] test/Outer<MyParam>.constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] T : R|MyParam|>(): R|test/Outer.Inner<T, MyParam>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -37,12 +37,12 @@ Tower Data Context:
|
||||
FirValueParameterSymbol p: R|MyParam|
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromInner_typeRefInMember.kt
|
||||
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Outer<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(STATUS)] class Inner<[ResolvedTo(STATUS)] Outer(MyParam)> : R|kotlin/Any| {
|
||||
public final inner [ResolvedTo(ANNOTATION_ARGUMENTS)] class Inner<[ResolvedTo(ANNOTATION_ARGUMENTS)] Outer(MyParam)> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] test/Outer<MyParam>.constructor(): R|test/Outer.Inner<MyParam>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+4
-4
@@ -31,13 +31,13 @@ Tower Data Context:
|
||||
FirTypeParameterSymbol T : <ERROR TYPE REF: Symbol not found for MyParam>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromNested_typeBound.kt
|
||||
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Outer<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] class Nested<[ResolvedTo(STATUS)] T : <ERROR TYPE REF: Symbol not found for MyParam>> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] T : <ERROR TYPE REF: Symbol not found for MyParam>>(): R|test/Outer.Nested<T>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Nested<[ResolvedTo(ANNOTATION_ARGUMENTS)] T : <ERROR TYPE REF: Symbol not found for MyParam>> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] T : <ERROR TYPE REF: Symbol not found for MyParam>>(): R|test/Outer.Nested<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -27,12 +27,12 @@ Tower Data Context:
|
||||
FirValueParameterSymbol p: <ERROR TYPE REF: Symbol not found for MyParam>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromNested_typeRefInMember.kt
|
||||
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Outer<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Nested : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/Outer.Nested| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+3
-3
@@ -25,9 +25,9 @@ FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromSuperType.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam> : R|test/Base<MyParam>| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Outer<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam> : R|test/Base<MyParam>| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam>(): R|test/Outer<MyParam>| {
|
||||
super<R|test/Base<MyParam>|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -20,9 +20,9 @@ Tower Data Context:
|
||||
FirTypeParameterSymbol Other : R|MyParam|
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] declaredInClass_fromTypeBound.kt
|
||||
public final [ResolvedTo(STATUS)] class Outer<[ResolvedTo(STATUS)] MyParam, [ResolvedTo(STATUS)] Other : R|MyParam|> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(STATUS)] MyParam, [ResolvedTo(STATUS)] Other : R|MyParam|>(): R|test/Outer<MyParam, Other>| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Outer<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam, [ResolvedTo(ANNOTATION_ARGUMENTS)] Other : R|MyParam|> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] constructor<[ResolvedTo(ANNOTATION_ARGUMENTS)] MyParam, [ResolvedTo(ANNOTATION_ARGUMENTS)] Other : R|MyParam|>(): R|test/Outer<MyParam, Other>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user