K2: Update substituted member candidate if it contains type variables

See the comment at updateSubstitutedMemberIfReceiverContainsTypeVariable

It became necessary after delegate inference is rewritten, since before
that happened, stub types were being left there and FIR2IR handled
them accidentally properly because stub types are equal to anything.

But that wasn't really correct even there because stub types are not
intended to leak out of the FIR

^KT-61060
This commit is contained in:
Denis.Zharkov
2023-08-08 12:33:05 +02:00
committed by Space Team
parent 0f6a51fd97
commit 034671ad78
36 changed files with 272 additions and 45 deletions
@@ -311,7 +311,7 @@ FILE: [ResolvedTo(IMPORTS)] lazyProperty.kt
}
)
public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [ContainingClassKey=Test] get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.resolveMe|)
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.resolveMe|)
}
}
@@ -346,7 +346,7 @@ FILE: [ResolvedTo(IMPORTS)] lazyProperty.kt
}
)
public [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] [ContainingClassKey=Test] get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.resolveMe|)
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.resolveMe|)
}
}
@@ -381,7 +381,7 @@ FILE: [ResolvedTo(IMPORTS)] lazyProperty.kt
}
)
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Test] get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.resolveMe|)
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.resolveMe|)
}
}
@@ -420,7 +420,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] lazyProperty.kt
}
)
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Test] get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.resolveMe|)
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.resolveMe|)
}
}
@@ -409,7 +409,7 @@ FILE: [ResolvedTo(IMPORTS)] lazyPropertyScript.kts
}
)
public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [ContainingClassKey=Test] get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.resolveMe|)
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.resolveMe|)
}
}
@@ -453,7 +453,7 @@ FILE: [ResolvedTo(IMPORTS)] lazyPropertyScript.kts
}
)
public [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] [ContainingClassKey=Test] get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.resolveMe|)
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.resolveMe|)
}
}
@@ -497,7 +497,7 @@ FILE: [ResolvedTo(IMPORTS)] lazyPropertyScript.kts
}
)
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Test] get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.resolveMe|)
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.resolveMe|)
}
}
@@ -545,7 +545,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] lazyPropertyScript.kts
}
)
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Test] get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.resolveMe|)
^ this@R|/Test|.D|/Test.resolveMe|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.resolveMe|)
}
}
@@ -42,7 +42,7 @@ FILE: delegateInference.kt
public final var x: R|kotlin/Boolean|by R|/FreezableVar.FreezableVar|<R|kotlin/Boolean|>(Boolean(true))
public get(): R|kotlin/Boolean| {
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</FreezableVar.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.x|)
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</FreezableVar.getValue: R|kotlin/Boolean|>|(this@R|/Test|, ::R|/Test.x|)
}
public set(<set-?>: R|kotlin/Boolean|): R|kotlin/Unit| {
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</FreezableVar.setValue: R|kotlin/Unit|>|(this@R|/Test|, ::R|/Test.x|, R|<local>/x|)
@@ -50,7 +50,7 @@ FILE: delegateInference.kt
public final var y: R|kotlin/String|by R|/FreezableVar.FreezableVar|<R|kotlin/String|>(String())
public get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.y|.R|SubstitutionOverride</FreezableVar.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.y|)
^ this@R|/Test|.D|/Test.y|.R|SubstitutionOverride</FreezableVar.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.y|)
}
public set(<set-?>: R|kotlin/String|): R|kotlin/Unit| {
^ this@R|/Test|.D|/Test.y|.R|SubstitutionOverride</FreezableVar.setValue: R|kotlin/Unit|>|(this@R|/Test|, ::R|/Test.y|, R|<local>/y|)
@@ -31,7 +31,7 @@ FILE: delegateWithLambda.kt
}
)
public get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/Test|, ::R|/Test.x|)
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.x|)
}
}
@@ -38,9 +38,9 @@ FILE: provideDelegate.kt
super<R|kotlin/Any|>()
}
public final val x: R|kotlin/Int|by R|/delegate|<R|kotlin/Int|>(Int(1)).R|SubstitutionOverride</DelegateProvider.provideDelegate: R|Delegate<Stub (chain inference): TypeVariable(+T)>|>|(this@R|/A|, ::R|/A.x|)
public final val x: R|kotlin/Int|by R|/delegate|<R|kotlin/Int|>(Int(1)).R|SubstitutionOverride</DelegateProvider.provideDelegate: R|Delegate<kotlin/Int>|>|(this@R|/A|, ::R|/A.x|)
public get(): R|kotlin/Int| {
^ this@R|/A|.D|/A.x|.R|SubstitutionOverride</Delegate.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/A|, ::R|/A.x|)
^ this@R|/A|.D|/A.x|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/Int|>|(this@R|/A|, ::R|/A.x|)
}
}
@@ -29,9 +29,9 @@ FILE: receiverInference.kt
super<R|kotlin/Any|>()
}
public final val d: R|kotlin/String|by R|/mkProp|<R|MyEnt|, R|kotlin/String|>().R|SubstitutionOverride</Provider.provideDelegate: R|Prop<Stub (chain inference): TypeVariable(+R), Stub (chain inference): TypeVariable(+V)>|>|(this@R|/MyEnt|, ::R|/MyEnt.d|)
public final val d: R|kotlin/String|by R|/mkProp|<R|MyEnt|, R|kotlin/String|>().R|SubstitutionOverride</Provider.provideDelegate: R|Prop<MyEnt, kotlin/String>|>|(this@R|/MyEnt|, ::R|/MyEnt.d|)
public get(): R|kotlin/String| {
^ this@R|/MyEnt|.D|/MyEnt.d|.R|SubstitutionOverride</Prop.getValue: R|Stub (chain inference): TypeVariable(+V)|>|(this@R|/MyEnt|, ::R|/MyEnt.d|)
^ this@R|/MyEnt|.D|/MyEnt.d|.R|SubstitutionOverride</Prop.getValue: R|kotlin/String|>|(this@R|/MyEnt|, ::R|/MyEnt.d|)
}
}
@@ -35,7 +35,7 @@ FILE: delegateTypeMismatch.kt
public final var classifierNamePolicy: R|ClassifierNamePolicy|by this@R|/A|.R|/A.property|<R|ClassifierNamePolicy|>(Q|ClassifierNamePolicy.SOURCE_CODE_QUALIFIED|)
public get(): R|ClassifierNamePolicy| {
^ this@R|/A|.D|/A.classifierNamePolicy|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/A|, ::R|/A.classifierNamePolicy|)
^ this@R|/A|.D|/A.classifierNamePolicy|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|ClassifierNamePolicy|>|(this@R|/A|, ::R|/A.classifierNamePolicy|)
}
public set(<set-?>: R|ClassifierNamePolicy|): R|kotlin/Unit| {
^ this@R|/A|.D|/A.classifierNamePolicy|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(this@R|/A|, ::R|/A.classifierNamePolicy|, R|<local>/classifierNamePolicy|)
@@ -212,8 +212,8 @@ digraph delegateWithAnonymousObject_kt {
color=blue
65 [label="Enter block"];
66 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
67 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (chain inference): TypeVariable(+Target)|>|(...)" style="filled" fillcolor=yellow];
68 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (chain inference): TypeVariable(+Target)|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"];
67 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(...)" style="filled" fillcolor=yellow];
68 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"];
69 [label="Stub" style="filled" fillcolor=gray];
70 [label="Exit block" style="filled" fillcolor=gray];
}
@@ -41,7 +41,7 @@ FILE: delegateWithAnonymousObject.kt
}
)
public get(): R|IssueListView| {
^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (chain inference): TypeVariable(+Target)|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)
^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)
}
public set(<set-?>: R|IssueListView|): R|kotlin/Unit| {
^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|<local>/issueListView|)
@@ -25,12 +25,12 @@ FILE: kt41917.kt
public final val implicit: R|kotlin/String|by R|/DummyDelegate.DummyDelegate|<R|kotlin/String|>(String(hello))
public get(): R|kotlin/String| {
^ this@R|/A|.D|/A.implicit|.R|SubstitutionOverride</DummyDelegate.getValue: R|Stub (chain inference): TypeVariable(+V)|>|(this@R|/A|, ::R|/A.implicit|)
^ this@R|/A|.D|/A.implicit|.R|SubstitutionOverride</DummyDelegate.getValue: R|kotlin/String|>|(this@R|/A|, ::R|/A.implicit|)
}
public final val explicit: R|kotlin/String|by R|/DummyDelegate.DummyDelegate|<R|kotlin/String|>(String(hello))
public get(): R|kotlin/String| {
^ this@R|/A|.D|/A.explicit|.R|SubstitutionOverride</DummyDelegate.getValue: R|Stub (chain inference): TypeVariable(+V)|>|(this@R|/A|, ::R|/A.explicit|)
^ this@R|/A|.D|/A.explicit|.R|SubstitutionOverride</DummyDelegate.getValue: R|kotlin/String|>|(this@R|/A|, ::R|/A.explicit|)
}
}
@@ -19,7 +19,7 @@ FILE: nullableTypeDelegate.kt
public final var other: R|MyClassSome?|by this@R|/MyClassSome|.R|/directed|<R|MyClassSome|, R|MyClassSome|>(<getClass>(Q|MyClassSome|).R|kotlin/jvm/java|<R|MyClassSome|>)
public get(): R|MyClassSome?| {
^ this@R|/MyClassSome|.D|/MyClassSome.other|.R|SubstitutionOverride</Delegate.getValue: R|Stub (chain inference): TypeVariable(+Target)?|>|(this@R|/MyClassSome|, ::R|/MyClassSome.other|)
^ this@R|/MyClassSome|.D|/MyClassSome.other|.R|SubstitutionOverride</Delegate.getValue: R|MyClassSome?|>|(this@R|/MyClassSome|, ::R|/MyClassSome.other|)
}
public set(<set-?>: R|MyClassSome?|): R|kotlin/Unit| {
^ this@R|/MyClassSome|.D|/MyClassSome.other|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/MyClassSome|, ::R|/MyClassSome.other|, R|<local>/other|)
@@ -26,7 +26,7 @@ FILE: propertyWithFunctionalType.kt
}
)
public get(): R|(B) -> B| {
^ this@R|/A|.D|/A.conventerWithExpectedType|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/A|, ::R|/A.conventerWithExpectedType|)
^ this@R|/A|.D|/A.conventerWithExpectedType|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|(B) -> B|>|(this@R|/A|, ::R|/A.conventerWithExpectedType|)
}
public set(<set-?>: R|(B) -> B|): R|kotlin/Unit| {
^ this@R|/A|.D|/A.conventerWithExpectedType|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(this@R|/A|, ::R|/A.conventerWithExpectedType|, R|<local>/conventerWithExpectedType|)
@@ -30,14 +30,14 @@ FILE: hideBySeverity.kt
super<R|BaseState|>()
}
public final val hideBySeverityDerived: R|kotlin/collections/MutableSet<kotlin/Int>|by this@R|/Some|.R|/BaseState.propertyDerived|<R|kotlin/collections/MutableSet<kotlin/Int>|>(R|kotlin/collections/mutableSetOf|<R|kotlin/Int|>()).R|SubstitutionOverride</StoredPropertyDerived.provideDelegate: R|StoredPropertyBase<Stub (chain inference): TypeVariable(+PROPERTY_TYPE)>|>|(this@R|/Some|, ::R|/Some.hideBySeverityDerived|)
public final val hideBySeverityDerived: R|kotlin/collections/MutableSet<kotlin/Int>|by this@R|/Some|.R|/BaseState.propertyDerived|<R|kotlin/collections/MutableSet<kotlin/Int>|>(R|kotlin/collections/mutableSetOf|<R|kotlin/Int|>()).R|SubstitutionOverride</StoredPropertyDerived.provideDelegate: R|StoredPropertyBase<kotlin/collections/MutableSet<kotlin/Int>>|>|(this@R|/Some|, ::R|/Some.hideBySeverityDerived|)
public get(): R|kotlin/collections/MutableSet<kotlin/Int>| {
^ this@R|/Some|.D|/Some.hideBySeverityDerived|.R|SubstitutionOverride</StoredPropertyBase.getValue: R|Stub (chain inference): TypeVariable(+PROPERTY_TYPE)|>|(this@R|/Some|, ::R|/Some.hideBySeverityDerived|)
^ this@R|/Some|.D|/Some.hideBySeverityDerived|.R|SubstitutionOverride</StoredPropertyBase.getValue: R|kotlin/collections/MutableSet<kotlin/Int>|>|(this@R|/Some|, ::R|/Some.hideBySeverityDerived|)
}
public final val hideBySeverityBase: R|kotlin/collections/MutableSet<kotlin/Int>|by this@R|/Some|.R|/BaseState.propertyBase|<R|kotlin/collections/MutableSet<kotlin/Int>|>(R|kotlin/collections/mutableSetOf|<R|kotlin/Int|>())
public get(): R|kotlin/collections/MutableSet<kotlin/Int>| {
^ this@R|/Some|.D|/Some.hideBySeverityBase|.R|SubstitutionOverride</StoredPropertyBase.getValue: R|Stub (chain inference): TypeVariable(+PROPERTY_TYPE)|>|(this@R|/Some|, ::R|/Some.hideBySeverityBase|)
^ this@R|/Some|.D|/Some.hideBySeverityBase|.R|SubstitutionOverride</StoredPropertyBase.getValue: R|kotlin/collections/MutableSet<kotlin/Int>|>|(this@R|/Some|, ::R|/Some.hideBySeverityBase|)
}
}
@@ -61,7 +61,7 @@ FILE: WithValidityAssertion.kt
}
)
private get(): R|kotlin/collections/List<kotlin/String>| {
^ this@R|/KtFirNonStarImportingScope|.D|/KtFirNonStarImportingScope.imports|.R|SubstitutionOverride</ValidityAwareCachedValue.getValue: R|Stub (chain inference): TypeVariable(+T)|>|(this@R|/KtFirNonStarImportingScope|, ::R|/KtFirNonStarImportingScope.imports|)
^ this@R|/KtFirNonStarImportingScope|.D|/KtFirNonStarImportingScope.imports|.R|SubstitutionOverride</ValidityAwareCachedValue.getValue: R|kotlin/collections/List<kotlin/String>|>|(this@R|/KtFirNonStarImportingScope|, ::R|/KtFirNonStarImportingScope.imports|)
}
public final fun getCallableSymbols(nameFilter: R|KtScopeNameFilter|): R|kotlin/sequences/Sequence<KtCallableSymbol>| {
@@ -15405,6 +15405,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateInSubClass.kt")
public void testPrivateInSubClass() throws Exception {
@@ -15405,6 +15405,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateInSubClass.kt")
public void testPrivateInSubClass() throws Exception {
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.resolve.calls.tower.isSuccess
import org.jetbrains.kotlin.util.CodeFragmentAdjustment
class Candidate(
override val symbol: FirBasedSymbol<*>,
symbol: FirBasedSymbol<*>,
// Here we may have an ExpressionReceiverValue
// - in case a use-site receiver is explicit
// - in some cases with static entities, no matter is a use-site receiver explicit or not
@@ -49,6 +49,23 @@ class Candidate(
val isFromOriginalTypeInPresenceOfSmartCast: Boolean = false,
) : AbstractCandidate() {
override var symbol: FirBasedSymbol<*> = symbol
private set
/**
* Please avoid updating symbol in the candidate whenever it's possible.
* The only case when currently it seems to be unavoidable is at
* [org.jetbrains.kotlin.fir.resolve.transformers.FirCallCompletionResultsWriterTransformer.refineSubstitutedMemberIfReceiverContainsTypeVariable]
*/
@RequiresOptIn
annotation class UpdatingSymbol
@UpdatingSymbol
fun updateSymbol(symbol: FirBasedSymbol<*>) {
this.symbol = symbol
}
private var systemInitialized: Boolean = false
val system: NewConstraintSystemImpl by lazy(LazyThreadSafetyMode.NONE) {
val system = constraintSystemFactory.createConstraintSystem()
@@ -105,7 +105,7 @@ class FirCallCompleter(
.buildAbstractResultingSubstitutor(session.typeContext) as ConeSubstitutor
val completedCall = call.transformSingle(
FirCallCompletionResultsWriterTransformer(
session, finalSubstitutor,
session, components.scopeSession, finalSubstitutor,
components.returnTypeCalculator,
session.typeApproximator,
components.dataFlowAnalyzer,
@@ -222,7 +222,7 @@ class FirCallCompleter(
mode: FirCallCompletionResultsWriterTransformer.Mode = FirCallCompletionResultsWriterTransformer.Mode.Normal
): FirCallCompletionResultsWriterTransformer {
return FirCallCompletionResultsWriterTransformer(
session, substitutor, components.returnTypeCalculator,
session, components.scopeSession, substitutor, components.returnTypeCalculator,
session.typeApproximator,
components.dataFlowAnalyzer,
components.integerLiteralAndOperatorApproximationTransformer,
@@ -18,21 +18,22 @@ import org.jetbrains.kotlin.fir.references.builder.buildResolvedCallableReferenc
import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference
import org.jetbrains.kotlin.fir.resolve.*
import org.jetbrains.kotlin.fir.resolve.calls.Candidate
import org.jetbrains.kotlin.fir.resolve.calls.ResolutionResultOverridesOtherToPreserveCompatibility
import org.jetbrains.kotlin.fir.resolve.calls.FirErrorReferenceWithCandidate
import org.jetbrains.kotlin.fir.resolve.calls.FirNamedReferenceWithCandidate
import org.jetbrains.kotlin.fir.resolve.calls.ResolutionResultOverridesOtherToPreserveCompatibility
import org.jetbrains.kotlin.fir.resolve.dfa.FirDataFlowAnalyzer
import org.jetbrains.kotlin.fir.resolve.diagnostics.*
import org.jetbrains.kotlin.fir.resolve.inference.ResolvedLambdaAtom
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.*
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
import org.jetbrains.kotlin.fir.scopes.impl.ConvertibleIntegerOperators.binaryOperatorsWithSignedArgument
import org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope
import org.jetbrains.kotlin.fir.scopes.impl.isWrappedIntegerOperator
import org.jetbrains.kotlin.fir.scopes.impl.isWrappedIntegerOperatorForUnsignedType
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
import org.jetbrains.kotlin.fir.symbols.impl.*
import org.jetbrains.kotlin.fir.types.*
import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef
import org.jetbrains.kotlin.fir.types.builder.buildStarProjection
@@ -52,6 +53,7 @@ import kotlin.collections.component2
class FirCallCompletionResultsWriterTransformer(
override val session: FirSession,
private val scopeSession: ScopeSession,
private val finalSubstitutor: ConeSubstitutor,
private val typeCalculator: ReturnTypeCalculator,
private val typeApproximator: ConeTypeApproximator,
@@ -95,6 +97,8 @@ class FirCallCompletionResultsWriterTransformer(
): T {
val subCandidate = calleeReference.candidate
subCandidate.updateSubstitutedMemberIfReceiverContainsTypeVariable()
val declaration = subCandidate.symbol.fir
val typeArguments = computeTypeArguments(qualifiedAccessExpression, subCandidate)
val type = if (declaration is FirCallableDeclaration) {
@@ -159,6 +163,99 @@ class FirCallCompletionResultsWriterTransformer(
return qualifiedAccessExpression
}
/**
* Currently, it's only necessary for delegate inference, e.g. when the delegate expression returns some generic type
* with non-fixed yet type variables and inside its member scope we find the `getValue` function that might still contain
* the type variables, too and they even might be used to adding some constraints for them.
*
* After the completion ends and all the variables are fixed, this member candidate still contains them, so what this function does
* is replace the candidate from Delegate<Tv, ...> scope to the same candidate from Delegate<ResultTypeForT, ..>.
*
* The fun fact is that it wasn't necessary before Delegate Inference refactoring because there were stub types left and FIR2IR
* handled them properly as equal-to-anything unlike the type variable types.
*
* See codegen/box/delegatedProperty/noTypeVariablesLeft.kt
*
* That all looks a bit ugly, but there are not many options.
* In an ideal world, we wouldn't have substitution overrides in FIR, but instead used a pair original symbol and substitution
* everywhere, but we're not there yet.
*
* TODO: In future, it would be nice to get rid of it and there's actually a way to do it not using substitution overrides (see KT-61618)
*/
private fun Candidate.updateSubstitutedMemberIfReceiverContainsTypeVariable() {
val updatedSymbol = symbol.updateSubstitutedMemberIfReceiverContainsTypeVariable() ?: return
val oldSymbol = symbol
@OptIn(Candidate.UpdatingSymbol::class)
updateSymbol(updatedSymbol)
check(updatedSymbol is FirCallableSymbol<*>)
substitutor = substitutorByMap(
updatedSymbol.typeParameterSymbols.zip(freshVariables).associate { (typeParameter, typeVariable) ->
typeParameter to typeVariable.defaultType
},
session,
)
if (updatedSymbol !is FirFunctionSymbol) return
require(oldSymbol is FirFunctionSymbol)
val oldArgumentMapping = argumentMapping ?: return
val oldValueParametersToNewMap = oldSymbol.valueParameterSymbols.zip(updatedSymbol.valueParameterSymbols).toMap()
argumentMapping = oldArgumentMapping.mapValuesTo(linkedMapOf()) {
oldValueParametersToNewMap[it.value.symbol]!!.fir
}
}
private fun FirBasedSymbol<*>.updateSubstitutedMemberIfReceiverContainsTypeVariable(): FirBasedSymbol<*>? {
// TODO: Add assertion that this function returns not-null only for BI and delegation inference
if (mode != Mode.DelegatedPropertyCompletion) return null
val fir = fir
if (fir !is FirCallableDeclaration) return null
val dispatchReceiverType = fir.dispatchReceiverType ?: return null
val updatedDispatchReceiverType = finalSubstitutor.substituteOrNull(dispatchReceiverType) ?: return null
val scope =
updatedDispatchReceiverType.scope(
session,
scopeSession,
FakeOverrideTypeCalculator.DoNothing,
FirResolvePhase.STATUS
) as? FirClassSubstitutionScope ?: return null
val original = fir.originalForSubstitutionOverride ?: return null
return findSingleSubstitutedSymbolWithOriginal(original.symbol) { processor ->
when (original) {
is FirSimpleFunction -> scope.processFunctionsByName(original.name, processor)
is FirProperty -> scope.processFunctionsByName(original.name, processor)
is FirConstructor -> scope.processDeclaredConstructors(processor)
else -> error("Unexpected declaration kind ${original.render()}")
}
}
}
private fun findSingleSubstitutedSymbolWithOriginal(
original: FirBasedSymbol<*>,
processCallables: ((FirCallableSymbol<*>) -> Unit) -> Unit,
): FirBasedSymbol<*> {
var result: FirBasedSymbol<*>? = null
processCallables { symbol ->
if (symbol.originalForSubstitutionOverride == original) {
check(result == null) {
"Expected single, but ${result!!.fir.render()} and ${symbol.fir.render()} found"
}
result = symbol
}
}
return result ?: error("No symbol found for ${original.fir.render()}")
}
override fun transformQualifiedAccessExpression(
qualifiedAccessExpression: FirQualifiedAccessExpression,
data: ExpectedArgumentType?,
@@ -0,0 +1,18 @@
import kotlin.reflect.KProperty
var foo: (() -> String)? by property(null)
private fun <T> property(initialValue: T): RwProperty<T> = RwProperty(initialValue)
class RwProperty<V>(var v: V) {
operator fun getValue(thisRef: Any?, property: KProperty<*>): V = v
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: V) {
this.v = value
}
}
fun box(): String {
foo = { "OK" }
return foo!!.invoke()
}
@@ -6,7 +6,7 @@ FILE: kt50994.fir.kt
public final var processor: R|ProcessorWithChildren?|by this@R|/ProcessorWithParent|.R|/parent|<R|ProcessorWithParent|, R|ProcessorWithChildren|>(Q|ProcessorWithChildren|::R|/ProcessorWithChildren.processors|)
public get(): R|ProcessorWithChildren?| {
^ this@R|/ProcessorWithParent|.D|/ProcessorWithParent.processor|.R|SubstitutionOverride</Delegate.getValue: R|Stub (chain inference): TypeVariable(+TP)?|>|(this@R|/ProcessorWithParent|, ::R|/ProcessorWithParent.processor|)
^ this@R|/ProcessorWithParent|.D|/ProcessorWithParent.processor|.R|SubstitutionOverride</Delegate.getValue: R|ProcessorWithChildren?|>|(this@R|/ProcessorWithParent|, ::R|/ProcessorWithParent.processor|)
}
public set(<set-?>: R|ProcessorWithChildren?|): R|kotlin/Unit| {
^ this@R|/ProcessorWithParent|.D|/ProcessorWithParent.processor|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/ProcessorWithParent|, ::R|/ProcessorWithParent.processor|, R|<local>/processor|)
@@ -18,11 +18,11 @@ FILE: kt50994.fir.kt
super<R|kotlin/Any|>()
}
public final var processors: R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>|by this@R|/ProcessorWithChildren|.R|/children<Inapplicable(INAPPLICABLE): /children>#|<<ERROR TYPE REF: Type for SC is not inferred>, <ERROR TYPE REF: Type for TC is not inferred>>(<getClass>(Q|ProcessorWithParent|).R|kotlin/jvm/java|<R|ProcessorWithParent|>, Q|ProcessorWithParent|::<Unresolved reference: processor>#)
public get(): R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>| {
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(+TC)>|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|)
public final var processors: R|kotlin/collections/MutableCollection<ProcessorWithParent>|by this@R|/ProcessorWithChildren|.R|/children<Inapplicable(INAPPLICABLE): /children>#|<R|ProcessorWithChildren|, R|ProcessorWithParent|>(<getClass>(Q|ProcessorWithParent|).R|kotlin/jvm/java|<R|ProcessorWithParent|>, Q|ProcessorWithParent|::<Unresolved reference: processor>#)
public get(): R|kotlin/collections/MutableCollection<ProcessorWithParent>| {
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<ProcessorWithParent>|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>|): R|kotlin/Unit| {
public set(<set-?>: R|kotlin/collections/MutableCollection<ProcessorWithParent>|): R|kotlin/Unit| {
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|, R|<local>/processors|)
}
@@ -48,7 +48,7 @@ FILE: kt50994.fir.kt
public final var processors: R|kotlin/collections/MutableCollection<Processor2WithParent>|by this@R|/Processor2WithChildren|.R|/children|<R|Processor2WithChildren|, R|Processor2WithParent|>(<getClass>(Q|Processor2WithParent|).R|kotlin/jvm/java|<R|Processor2WithParent|>, Q|Processor2WithParent|::R|/Processor2WithParent.processor|)
public get(): R|kotlin/collections/MutableCollection<Processor2WithParent>| {
^ this@R|/Processor2WithChildren|.D|/Processor2WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(+TC)>|>|(this@R|/Processor2WithChildren|, ::R|/Processor2WithChildren.processors|)
^ this@R|/Processor2WithChildren|.D|/Processor2WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Processor2WithParent>|>|(this@R|/Processor2WithChildren|, ::R|/Processor2WithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<Processor2WithParent>|): R|kotlin/Unit| {
^ this@R|/Processor2WithChildren|.D|/Processor2WithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/Processor2WithChildren|, ::R|/Processor2WithChildren.processors|, R|<local>/processors|)
@@ -76,7 +76,7 @@ FILE: kt50994.fir.kt
public final var processors: R|kotlin/collections/MutableCollection<Processor3WithParent>|by this@R|/Processor3WithChildren|.R|/children|<R|Processor3WithChildren|, R|Processor3WithParent|>(<getClass>(Q|Processor3WithParent|).R|kotlin/jvm/java|<R|Processor3WithParent|>, Q|Processor3WithParent|::R|/Processor3WithParent.processor|)
public get(): R|kotlin/collections/MutableCollection<Processor3WithParent>| {
^ this@R|/Processor3WithChildren|.D|/Processor3WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(+TC)>|>|(this@R|/Processor3WithChildren|, ::R|/Processor3WithChildren.processors|)
^ this@R|/Processor3WithChildren|.D|/Processor3WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Processor3WithParent>|>|(this@R|/Processor3WithChildren|, ::R|/Processor3WithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<Processor3WithParent>|): R|kotlin/Unit| {
^ this@R|/Processor3WithChildren|.D|/Processor3WithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/Processor3WithChildren|, ::R|/Processor3WithChildren.processors|, R|<local>/processors|)
@@ -6,7 +6,7 @@ FILE: kt50994.reversed.kt
public final var processor: R|ProcessorWithChildren?|by this@R|/ProcessorWithParent|.R|/parent|<R|ProcessorWithParent|, R|ProcessorWithChildren|>(Q|ProcessorWithChildren|::R|/ProcessorWithChildren.processors|)
public get(): R|ProcessorWithChildren?| {
^ this@R|/ProcessorWithParent|.D|/ProcessorWithParent.processor|.R|SubstitutionOverride</Delegate.getValue: R|Stub (chain inference): TypeVariable(+TP)?|>|(this@R|/ProcessorWithParent|, ::R|/ProcessorWithParent.processor|)
^ this@R|/ProcessorWithParent|.D|/ProcessorWithParent.processor|.R|SubstitutionOverride</Delegate.getValue: R|ProcessorWithChildren?|>|(this@R|/ProcessorWithParent|, ::R|/ProcessorWithParent.processor|)
}
public set(<set-?>: R|ProcessorWithChildren?|): R|kotlin/Unit| {
^ this@R|/ProcessorWithParent|.D|/ProcessorWithParent.processor|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/ProcessorWithParent|, ::R|/ProcessorWithParent.processor|, R|<local>/processor|)
@@ -20,7 +20,7 @@ FILE: kt50994.reversed.kt
public final var processors: R|kotlin/collections/MutableCollection<ProcessorWithParent>|by this@R|/ProcessorWithChildren|.R|/children|<R|ProcessorWithChildren|, R|ProcessorWithParent|>(<getClass>(Q|ProcessorWithParent|).R|kotlin/jvm/java|<R|ProcessorWithParent|>, Q|ProcessorWithParent|::R|/ProcessorWithParent.processor|)
public get(): R|kotlin/collections/MutableCollection<ProcessorWithParent>| {
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(+TC)>|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|)
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<ProcessorWithParent>|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<ProcessorWithParent>|): R|kotlin/Unit| {
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|, R|<local>/processors|)
@@ -48,7 +48,7 @@ FILE: kt50994.reversed.kt
public final var processors: R|kotlin/collections/MutableCollection<Processor2WithParent>|by this@R|/Processor2WithChildren|.R|/children|<R|Processor2WithChildren|, R|Processor2WithParent|>(<getClass>(Q|Processor2WithParent|).R|kotlin/jvm/java|<R|Processor2WithParent|>, Q|Processor2WithParent|::R|/Processor2WithParent.processor|)
public get(): R|kotlin/collections/MutableCollection<Processor2WithParent>| {
^ this@R|/Processor2WithChildren|.D|/Processor2WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(+TC)>|>|(this@R|/Processor2WithChildren|, ::R|/Processor2WithChildren.processors|)
^ this@R|/Processor2WithChildren|.D|/Processor2WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Processor2WithParent>|>|(this@R|/Processor2WithChildren|, ::R|/Processor2WithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<Processor2WithParent>|): R|kotlin/Unit| {
^ this@R|/Processor2WithChildren|.D|/Processor2WithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/Processor2WithChildren|, ::R|/Processor2WithChildren.processors|, R|<local>/processors|)
@@ -76,7 +76,7 @@ FILE: kt50994.reversed.kt
public final var processors: R|kotlin/collections/MutableCollection<Processor3WithParent>|by this@R|/Processor3WithChildren|.R|/children|<R|Processor3WithChildren|, R|Processor3WithParent|>(<getClass>(Q|Processor3WithParent|).R|kotlin/jvm/java|<R|Processor3WithParent|>, Q|Processor3WithParent|::R|/Processor3WithParent.processor|)
public get(): R|kotlin/collections/MutableCollection<Processor3WithParent>| {
^ this@R|/Processor3WithChildren|.D|/Processor3WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(+TC)>|>|(this@R|/Processor3WithChildren|, ::R|/Processor3WithChildren.processors|)
^ this@R|/Processor3WithChildren|.D|/Processor3WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Processor3WithParent>|>|(this@R|/Processor3WithChildren|, ::R|/Processor3WithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<Processor3WithParent>|): R|kotlin/Unit| {
^ this@R|/Processor3WithChildren|.D|/Processor3WithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/Processor3WithChildren|, ::R|/Processor3WithChildren.processors|, R|<local>/processors|)
@@ -15045,6 +15045,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateInSubClass.kt")
public void testPrivateInSubClass() throws Exception {
@@ -15405,6 +15405,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateInSubClass.kt")
public void testPrivateInSubClass() throws Exception {
@@ -15405,6 +15405,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateInSubClass.kt")
public void testPrivateInSubClass() throws Exception {
@@ -12643,6 +12643,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@TestMetadata("privateInSubClass.kt")
public void testPrivateInSubClass() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/privateInSubClass.kt");
@@ -11517,6 +11517,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -11517,6 +11517,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -11517,6 +11517,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -11517,6 +11517,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -12536,6 +12536,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -12826,6 +12826,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -12392,6 +12392,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -12537,6 +12537,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -11493,6 +11493,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {
@@ -11493,6 +11493,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt");
}
@Test
@TestMetadata("noTypeVariablesLeft.kt")
public void testNoTypeVariablesLeft() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/noTypeVariablesLeft.kt");
}
@Test
@TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception {