[FIR] Add forgotten updating phase of value parameters

This commit is contained in:
Dmitriy Novozhilov
2021-07-09 11:46:07 +03:00
committed by teamcityserver
parent d3966e8844
commit 22938522b3
8 changed files with 34 additions and 29 deletions
@@ -464,6 +464,8 @@ abstract class AbstractFirStatusResolveTransformer(
if (needReplacePhase(propertyAccessor)) {
propertyAccessor.replaceResolvePhase(transformerPhase)
}
propertyAccessor.transformValueParameters(this, null)
}
override fun transformConstructor(
@@ -110,6 +110,9 @@ open class FirTypeResolveTransformer(
property.replaceResolvePhase(FirResolvePhase.TYPES)
property.getter?.replaceResolvePhase(FirResolvePhase.TYPES)
property.setter?.replaceResolvePhase(FirResolvePhase.TYPES)
property.setter?.valueParameters?.forEach {
it.replaceResolvePhase(FirResolvePhase.TYPES)
}
}
property.transformTypeParameters(this, data)
.transformReturnTypeRef(this, data)
@@ -89,6 +89,7 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor
callableMember.valueParameters.forEach {
it.transformReturnTypeRef(transformer, ResolutionMode.ContextIndependent)
it.transformVarargTypeToArrayType()
it.replaceResolvePhase(FirResolvePhase.STATUS)
}
}
}
@@ -1,4 +1,3 @@
// FIR_IDE_IGNORE
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
// SKIP_TXT
@@ -372,7 +372,7 @@ FILE: delegates.kt
[STATUS] public get(): <implicit> {
^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|)
}
[STATUS] public set([RAW_FIR] <set-?>: <implicit>): R|kotlin/Unit| {
[STATUS] public set([STATUS] <set-?>: <implicit>): R|kotlin/Unit| {
D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|<local>/variableWithExplicitType|)
}
public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate|
@@ -468,7 +468,7 @@ FILE: delegates.kt
[STATUS] public get(): <implicit> {
^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|)
}
[STATUS] public set([RAW_FIR] <set-?>: <implicit>): R|kotlin/Unit| {
[STATUS] public set([STATUS] <set-?>: <implicit>): R|kotlin/Unit| {
D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|<local>/variableWithExplicitType|)
}
public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate|
@@ -516,7 +516,7 @@ FILE: delegates.kt
[STATUS] public get(): <implicit> {
^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|)
}
[STATUS] public set([RAW_FIR] <set-?>: <implicit>): R|kotlin/Unit| {
[STATUS] public set([STATUS] <set-?>: <implicit>): R|kotlin/Unit| {
D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|<local>/variableWithExplicitType|)
}
public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate|
@@ -660,7 +660,7 @@ FILE: delegates.kt
[STATUS] public get(): <implicit> {
^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|)
}
[STATUS] public set([RAW_FIR] <set-?>: <implicit>): R|kotlin/Unit| {
[STATUS] public set([STATUS] <set-?>: <implicit>): R|kotlin/Unit| {
D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|<local>/variableWithExplicitType|)
}
public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate|
@@ -52,7 +52,7 @@ FILE: parameterOfNonLocalSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int|
[TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -67,7 +67,7 @@ FILE: parameterOfNonLocalSetter.kt
public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int|
[STATUS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[STATUS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -82,7 +82,7 @@ FILE: parameterOfNonLocalSetter.kt
public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int|
[CONTRACTS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[CONTRACTS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -97,7 +97,7 @@ FILE: parameterOfNonLocalSetter.kt
public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int|
[CONTRACTS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[CONTRACTS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -172,7 +172,7 @@ FILE: parameterOfNonLocalSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int|
[TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -187,7 +187,7 @@ FILE: parameterOfNonLocalSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int|
[TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -217,7 +217,7 @@ FILE: parameterOfNonLocalSetter.kt
public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int|
[CONTRACTS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[CONTRACTS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -232,7 +232,7 @@ FILE: parameterOfNonLocalSetter.kt
public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int|
[STATUS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[STATUS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -247,7 +247,7 @@ FILE: parameterOfNonLocalSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int|
[TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -262,7 +262,7 @@ FILE: parameterOfNonLocalSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int|
[TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -123,7 +123,7 @@ FILE: propertyWithGetterAndSetter.kt
[STATUS] public get(): R|kotlin/Int| {
^ field#
}
[STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| {
[STATUS] public set([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| {
field# = value#
}
@@ -155,7 +155,7 @@ FILE: propertyWithGetterAndSetter.kt
[STATUS] public get(): R|kotlin/Int| {
^ field#
}
[STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| {
[STATUS] public set([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| {
field# = value#
}
@@ -171,7 +171,7 @@ FILE: propertyWithGetterAndSetter.kt
[STATUS] public get(): R|kotlin/Int| {
^ field#
}
[STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| {
[STATUS] public set([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| {
field# = value#
}
@@ -219,7 +219,7 @@ FILE: propertyWithGetterAndSetter.kt
[STATUS] public get(): R|kotlin/Int| {
^ field#
}
[STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| {
[STATUS] public set([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| {
field# = value#
}
@@ -26,7 +26,7 @@ TYPES:
FILE: typeParameterOfTopSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] public? get(): R|kotlin/Int|
[TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -34,7 +34,7 @@ STATUS:
FILE: typeParameterOfTopSetter.kt
public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] public get(): R|kotlin/Int|
[STATUS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[STATUS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -42,7 +42,7 @@ CONTRACTS:
FILE: typeParameterOfTopSetter.kt
public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] public get(): R|kotlin/Int|
[CONTRACTS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[CONTRACTS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -50,7 +50,7 @@ IMPLICIT_TYPES_BODY_RESOLVE:
FILE: typeParameterOfTopSetter.kt
public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] public get(): R|kotlin/Int|
[CONTRACTS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[CONTRACTS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -90,7 +90,7 @@ CallableReturnType:
FILE: typeParameterOfTopSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] public? get(): R|kotlin/Int|
[TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -98,7 +98,7 @@ AnnotationType:
FILE: typeParameterOfTopSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] public? get(): R|kotlin/Int|
[TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -114,7 +114,7 @@ CallableContracts:
FILE: typeParameterOfTopSetter.kt
public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] public get(): R|kotlin/Int|
[CONTRACTS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[CONTRACTS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -122,7 +122,7 @@ DeclarationStatus:
FILE: typeParameterOfTopSetter.kt
public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var x: R|kotlin/Int| = IntegerLiteral(2)
[BODY_RESOLVE] public get(): R|kotlin/Int|
[STATUS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[STATUS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -130,7 +130,7 @@ ValueParametersTypes:
FILE: typeParameterOfTopSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] public? get(): R|kotlin/Int|
[TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}
@@ -138,7 +138,7 @@ TypeParametersTypes:
FILE: typeParameterOfTopSetter.kt
public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2)
[TYPES] public? get(): R|kotlin/Int|
[TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
[TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| {
^ Unit#
}