K2: rename FakeOverrideTypeCalculator to CallableCopyTypeCalculator
This commits performs a rename. According to KT-61443 this calculator is applicable not only to fake (substitution/intersection) overrides.
This commit is contained in:
committed by
Space Team
parent
53e4e2f6b1
commit
f8ada456e4
+1
-1
@@ -261,7 +261,7 @@ internal class KtFirScopeProvider(
|
||||
private fun getFirTypeScope(type: KtFirType): FirTypeScope? = type.coneType.scope(
|
||||
firResolveSession.useSiteFirSession,
|
||||
getScopeSession(),
|
||||
FakeOverrideTypeCalculator.Forced,
|
||||
CallableCopyTypeCalculator.Forced,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ import org.jetbrains.kotlin.fir.resolve.providers.toSymbol
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.FirImportResolveTransformer
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.FirExplicitSimpleImportingScope
|
||||
import org.jetbrains.kotlin.fir.scopes.processClassifiersByName
|
||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
@@ -264,7 +264,7 @@ internal object FirReferenceResolveHelper {
|
||||
val scope = lhs.resolvedType.scope(
|
||||
session,
|
||||
analysisSession.getScopeSessionFor(analysisSession.useSiteSession),
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
) ?: return emptyList()
|
||||
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor
|
||||
import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticPropertyAccessor
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.*
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenProperties
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertyAccessorSymbol
|
||||
import org.jetbrains.kotlin.name.CallableId
|
||||
@@ -55,7 +55,7 @@ internal class KtFirPropertySetterSymbol(
|
||||
val containingClassScope = firSymbol.dispatchReceiverType?.scope(
|
||||
session,
|
||||
analysisSession.getScopeSessionFor(session),
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
) ?: return false
|
||||
|
||||
|
||||
+4
-4
@@ -18,7 +18,7 @@ import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirImplicitAwareBodyResolveTransformer
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirResolveContextCollector
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.ImplicitBodyResolveComputationSession
|
||||
import org.jetbrains.kotlin.fir.scopes.fakeOverrideSubstitution
|
||||
import org.jetbrains.kotlin.fir.scopes.callableCopySubstitutionForTypeUpdater
|
||||
|
||||
internal object LLFirImplicitTypesLazyResolver : LLFirLazyResolver(FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE) {
|
||||
override fun resolve(
|
||||
@@ -91,11 +91,11 @@ internal class LLFirImplicitBodyTargetResolver(
|
||||
|
||||
override fun rawResolve(target: FirElementWithResolveState): Unit = when {
|
||||
target is FirScript -> resolveScript(target)
|
||||
target is FirCallableDeclaration && target.attributes.fakeOverrideSubstitution != null -> {
|
||||
transformer.returnTypeCalculator.fakeOverrideTypeCalculator.computeReturnType(target)
|
||||
target is FirCallableDeclaration && target.attributes.callableCopySubstitutionForTypeUpdater != null -> {
|
||||
transformer.returnTypeCalculator.callableCopyTypeCalculator.computeReturnType(target)
|
||||
Unit
|
||||
}
|
||||
|
||||
else -> super.rawResolve(target)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
RAW_FIR:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -16,7 +16,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
IMPORTS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -33,7 +33,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -50,7 +50,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
COMPANION_GENERATION:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -67,7 +67,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
SUPER_TYPES:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -84,7 +84,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
TYPES:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -101,7 +101,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
STATUS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -118,7 +118,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
TARGET: public open [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -135,7 +135,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
ARGUMENTS_OF_ANNOTATIONS:
|
||||
TARGET: public open [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -152,7 +152,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
}
|
||||
|
||||
CONTRACTS:
|
||||
TARGET: public open [ResolvedTo(CONTRACTS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(CONTRACTS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
|
||||
Vendored
+10
-10
@@ -1,5 +1,5 @@
|
||||
RAW_FIR:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -12,7 +12,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
IMPORTS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -25,7 +25,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -38,7 +38,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
COMPANION_GENERATION:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -51,7 +51,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
SUPER_TYPES:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -64,7 +64,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
TYPES:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -77,7 +77,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
STATUS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -90,7 +90,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
TARGET: public open [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -103,7 +103,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
ARGUMENTS_OF_ANNOTATIONS:
|
||||
TARGET: public open [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
@@ -116,7 +116,7 @@ FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
}
|
||||
|
||||
CONTRACTS:
|
||||
TARGET: public open [ResolvedTo(CONTRACTS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(CONTRACTS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] usage.kt
|
||||
public final [ResolvedTo(STATUS)] [DelegateFieldsMapKey={0=FirFieldSymbol /Aaa.$$delegate_0}] class Aaa : R|Interface| {
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
RAW_FIR:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
@@ -22,7 +22,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
IMPORTS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
@@ -45,7 +45,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
@@ -68,7 +68,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
COMPANION_GENERATION:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
@@ -91,7 +91,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
SUPER_TYPES:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
@@ -114,7 +114,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
TYPES:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
@@ -137,7 +137,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
STATUS:
|
||||
TARGET: public open [ResolvedTo(STATUS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
@@ -160,7 +160,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
TARGET: public open [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
@@ -183,7 +183,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
ARGUMENTS_OF_ANNOTATIONS:
|
||||
TARGET: public open [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
|
||||
@@ -206,7 +206,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
CONTRACTS:
|
||||
TARGET: public open [ResolvedTo(CONTRACTS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0, FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType)] fun implicitType(): <implicit>
|
||||
TARGET: public open [ResolvedTo(CONTRACTS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor=Empty, baseSymbol=FirNamedFunctionSymbol /Interface.implicitType), DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /Interface.implicitType, containingClass=Aaa, delegateField=FirFieldSymbol /Aaa.$$delegate_0] fun implicitType(): <implicit>
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts
|
||||
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
|
||||
|
||||
Vendored
+10
-10
@@ -1,5 +1,5 @@
|
||||
RAW_FIR:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -22,7 +22,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
IMPORTS:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -45,7 +45,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -68,7 +68,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
COMPANION_GENERATION:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -91,7 +91,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
SUPER_TYPES:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -114,7 +114,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
TYPES:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -137,7 +137,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
STATUS:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -160,7 +160,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
TARGET: public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -183,7 +183,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
ARGUMENTS_OF_ANNOTATIONS:
|
||||
TARGET: public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
@@ -206,7 +206,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
}
|
||||
|
||||
CONTRACTS:
|
||||
TARGET: public final [ResolvedTo(CONTRACTS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(CONTRACTS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitType.kt
|
||||
|
||||
Vendored
+10
-10
@@ -1,5 +1,5 @@
|
||||
RAW_FIR:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -28,7 +28,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
IMPORTS:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -57,7 +57,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -86,7 +86,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
COMPANION_GENERATION:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -115,7 +115,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
SUPER_TYPES:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -144,7 +144,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
TYPES:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -173,7 +173,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
STATUS:
|
||||
TARGET: public final [ResolvedTo(STATUS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(STATUS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -202,7 +202,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
TARGET: public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -231,7 +231,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
ARGUMENTS_OF_ANNOTATIONS:
|
||||
TARGET: public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
@@ -260,7 +260,7 @@ FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
|
||||
CONTRACTS:
|
||||
TARGET: public final [ResolvedTo(CONTRACTS)] [FakeOverrideSubstitutionKey=FakeOverrideSubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
TARGET: public final [ResolvedTo(CONTRACTS)] [CallableCopySubstitutionKey=CallableCopySubstitution(substitutor={T -> kotlin/Int}, baseSymbol=FirPropertySymbol /AbstractClass.property), SubstitutedOverrideOriginalKey=/AbstractClass.property] val property: <implicit>
|
||||
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] substitutionFakeOverrideWithImplicitTypeScript.kts
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.fir.resolve.fullyExpandedType
|
||||
import org.jetbrains.kotlin.fir.resolve.outerType
|
||||
import org.jetbrains.kotlin.fir.resolve.providers.firProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.FirScope
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.FirPackageMemberScope
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.TypeAliasConstructorsSubstitutingScope
|
||||
@@ -336,7 +336,7 @@ private fun FirClassLikeSymbol<*>.expandedClassWithConstructorsScope(context: Ch
|
||||
val expandedClass = expandedType?.toRegularClassSymbol(context.session)
|
||||
val expandedTypeScope = expandedType?.scope(
|
||||
context.session, context.scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.defaultType
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.getDeclaredConstructors
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyDeclarationResolver
|
||||
@@ -215,7 +215,7 @@ abstract class AbstractAnnotationDeserializer(
|
||||
val classScope = firAnnotationClass.defaultType().scope(
|
||||
useSiteSession = session,
|
||||
scopeSession = ScopeSession(),
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = null,
|
||||
) ?: error("Null scope for $classId")
|
||||
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ class DelegatedMemberGenerator(private val components: Fir2IrComponents) : Fir2I
|
||||
val delegateToScope = firField.initializer!!.resolvedType
|
||||
.fullyExpandedType(session)
|
||||
.lowerBoundIfFlexible()
|
||||
.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, null) ?: return
|
||||
.scope(session, scopeSession, CallableCopyTypeCalculator.DoNothing, null) ?: return
|
||||
|
||||
val subClassLookupTag = firSubClass.symbol.toLookupTag()
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ class JvmMappedScope(
|
||||
newTypeParameters = null,
|
||||
newContextReceiverTypes = emptyList(),
|
||||
isExpect = false,
|
||||
fakeOverrideSubstitution = null
|
||||
callableCopySubstitutionForTypeUpdater = null
|
||||
)
|
||||
return newSymbol
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.fir.expressions.FirSmartCastExpression
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeRawScopeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap
|
||||
import org.jetbrains.kotlin.fir.scopes.*
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.FirScopeWithFakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.FirScopeWithCallableCopyReturnTypeUpdater
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.FirTypeIntersectionScope
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.dynamicMembersStorage
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.getOrBuildScopeForIntegerConstantOperatorType
|
||||
@@ -33,7 +33,7 @@ fun FirSmartCastExpression.smartcastScope(
|
||||
val smartcastScope = smartcastType.scope(
|
||||
useSiteSession = useSiteSession,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = requiredMembersPhase,
|
||||
)
|
||||
|
||||
@@ -44,7 +44,7 @@ fun FirSmartCastExpression.smartcastScope(
|
||||
val originalScope = originalExpression.resolvedType.scope(
|
||||
useSiteSession = useSiteSession,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = requiredMembersPhase,
|
||||
) ?: return smartcastScope
|
||||
|
||||
@@ -65,12 +65,12 @@ fun ConeClassLikeType.delegatingConstructorScope(
|
||||
fun ConeKotlinType.scope(
|
||||
useSiteSession: FirSession,
|
||||
scopeSession: ScopeSession,
|
||||
fakeOverrideTypeCalculator: FakeOverrideTypeCalculator,
|
||||
callableCopyTypeCalculator: CallableCopyTypeCalculator,
|
||||
requiredMembersPhase: FirResolvePhase?,
|
||||
): FirTypeScope? {
|
||||
val scope = scope(useSiteSession, scopeSession, requiredMembersPhase) ?: return null
|
||||
if (fakeOverrideTypeCalculator == FakeOverrideTypeCalculator.DoNothing) return scope
|
||||
return FirScopeWithFakeOverrideTypeCalculator(scope, fakeOverrideTypeCalculator)
|
||||
if (callableCopyTypeCalculator == CallableCopyTypeCalculator.DoNothing) return scope
|
||||
return FirScopeWithCallableCopyReturnTypeUpdater(scope, callableCopyTypeCalculator)
|
||||
}
|
||||
|
||||
private fun ConeKotlinType.scope(
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.fir.renderWithType
|
||||
import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.smartcastScope
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.FirTypeScope
|
||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
@@ -41,7 +41,7 @@ abstract class ReceiverValue {
|
||||
open fun scope(useSiteSession: FirSession, scopeSession: ScopeSession): FirTypeScope? = type.scope(
|
||||
useSiteSession = useSiteSession,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class ExpressionReceiverValue(override val receiverExpression: FirExpression) :
|
||||
return type.scope(
|
||||
useSiteSession,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
}
|
||||
@@ -95,7 +95,7 @@ sealed class ImplicitReceiverValue<S : FirBasedSymbol<*>>(
|
||||
type.scope(
|
||||
useSiteSession,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS
|
||||
)
|
||||
private set
|
||||
@@ -153,7 +153,7 @@ sealed class ImplicitReceiverValue<S : FirBasedSymbol<*>>(
|
||||
implicitScope = type.scope(
|
||||
useSiteSession = useSiteSession,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
}
|
||||
@@ -171,7 +171,7 @@ sealed class ImplicitReceiverValue<S : FirBasedSymbol<*>>(
|
||||
implicitScope = type.scope(
|
||||
useSiteSession = useSiteSession,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@
|
||||
package org.jetbrains.kotlin.fir.resolve.transformers
|
||||
|
||||
import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
|
||||
|
||||
abstract class ReturnTypeCalculator {
|
||||
abstract val fakeOverrideTypeCalculator: FakeOverrideTypeCalculator
|
||||
abstract val callableCopyTypeCalculator: CallableCopyTypeCalculator
|
||||
|
||||
abstract fun tryCalculateReturnTypeOrNull(declaration: FirCallableDeclaration): FirResolvedTypeRef?
|
||||
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration
|
||||
import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic
|
||||
import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind
|
||||
import org.jetbrains.kotlin.fir.render
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef
|
||||
|
||||
@@ -30,14 +30,14 @@ class ReturnTypeCalculatorForFullBodyResolve private constructor(
|
||||
)
|
||||
}
|
||||
|
||||
override val fakeOverrideTypeCalculator: FakeOverrideTypeCalculator
|
||||
get() = FakeOverrideTypeCalculator.Forced
|
||||
override val callableCopyTypeCalculator: CallableCopyTypeCalculator
|
||||
get() = CallableCopyTypeCalculator.Forced
|
||||
|
||||
override fun tryCalculateReturnTypeOrNull(declaration: FirCallableDeclaration): FirResolvedTypeRef? {
|
||||
val returnTypeRef = declaration.returnTypeRef
|
||||
if (returnTypeRef is FirResolvedTypeRef) return returnTypeRef
|
||||
if (declaration.origin.fromSupertypes) {
|
||||
return FakeOverrideTypeCalculator.Forced.computeReturnType(declaration)
|
||||
return CallableCopyTypeCalculator.Forced.computeReturnType(declaration)
|
||||
}
|
||||
|
||||
return buildErrorTypeRef { diagnostic = ConeSimpleDiagnostic("$reason: ${declaration.render()}", diagnosticKind) }
|
||||
|
||||
+14
-13
@@ -15,32 +15,33 @@ import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
|
||||
abstract class FakeOverrideTypeCalculator {
|
||||
abstract class CallableCopyTypeCalculator {
|
||||
abstract fun computeReturnType(declaration: FirCallableDeclaration): FirTypeRef?
|
||||
|
||||
object DoNothing : FakeOverrideTypeCalculator() {
|
||||
object DoNothing : CallableCopyTypeCalculator() {
|
||||
override fun computeReturnType(declaration: FirCallableDeclaration): FirTypeRef {
|
||||
return declaration.returnTypeRef
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AbstractFakeOverrideTypeCalculator : FakeOverrideTypeCalculator() {
|
||||
abstract class AbstractCallableCopyTypeCalculator : CallableCopyTypeCalculator() {
|
||||
override fun computeReturnType(declaration: FirCallableDeclaration): FirResolvedTypeRef? {
|
||||
val fakeOverrideSubstitution = declaration.attributes.fakeOverrideSubstitution ?: return declaration.getResolvedTypeRef()
|
||||
val callableCopySubstitutionForTypeUpdater = declaration.attributes.callableCopySubstitutionForTypeUpdater
|
||||
?: return declaration.getResolvedTypeRef()
|
||||
|
||||
// TODO: drop synchronized in KT-60385
|
||||
synchronized(fakeOverrideSubstitution) {
|
||||
if (declaration.attributes.fakeOverrideSubstitution == null) {
|
||||
synchronized(callableCopySubstitutionForTypeUpdater) {
|
||||
if (declaration.attributes.callableCopySubstitutionForTypeUpdater == null) {
|
||||
return declaration.returnTypeRef as FirResolvedTypeRef
|
||||
}
|
||||
|
||||
val (substitutor, baseSymbol) = fakeOverrideSubstitution
|
||||
val (substitutor, baseSymbol) = callableCopySubstitutionForTypeUpdater
|
||||
val baseDeclaration = baseSymbol.fir as FirCallableDeclaration
|
||||
val baseReturnType = computeReturnType(baseDeclaration)?.type ?: return null
|
||||
val coneType = substitutor.substituteOrSelf(baseReturnType)
|
||||
val returnType = declaration.returnTypeRef.resolvedTypeFromPrototype(coneType)
|
||||
declaration.replaceReturnTypeRef(returnType)
|
||||
declaration.attributes.fakeOverrideSubstitution = null
|
||||
declaration.attributes.callableCopySubstitutionForTypeUpdater = null
|
||||
return returnType
|
||||
}
|
||||
}
|
||||
@@ -49,7 +50,7 @@ abstract class FakeOverrideTypeCalculator {
|
||||
}
|
||||
|
||||
|
||||
object Forced : AbstractFakeOverrideTypeCalculator() {
|
||||
object Forced : AbstractCallableCopyTypeCalculator() {
|
||||
override fun FirCallableDeclaration.getResolvedTypeRef(): FirResolvedTypeRef? {
|
||||
return returnTypeRef as? FirResolvedTypeRef
|
||||
}
|
||||
@@ -58,13 +59,13 @@ abstract class FakeOverrideTypeCalculator {
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
object FakeOverrideSubstitutionKey : FirDeclarationDataKey()
|
||||
private object CallableCopySubstitutionKey : FirDeclarationDataKey()
|
||||
|
||||
var FirDeclarationAttributes.fakeOverrideSubstitution: FakeOverrideSubstitution? by FirDeclarationDataRegistry.attributesAccessor(
|
||||
FakeOverrideSubstitutionKey
|
||||
var FirDeclarationAttributes.callableCopySubstitutionForTypeUpdater: CallableCopySubstitution? by FirDeclarationDataRegistry.attributesAccessor(
|
||||
CallableCopySubstitutionKey
|
||||
)
|
||||
|
||||
data class FakeOverrideSubstitution(
|
||||
data class CallableCopySubstitution internal constructor(
|
||||
val substitutor: ConeSubstitutor,
|
||||
val baseSymbol: FirBasedSymbol<*>
|
||||
)
|
||||
+1
-1
@@ -125,7 +125,7 @@ fun FirClass.unsubstitutedScope(
|
||||
memberRequiredPhase: FirResolvePhase?,
|
||||
): FirTypeScope {
|
||||
val scope = scopeProvider.getUseSiteMemberScope(this, useSiteSession, scopeSession, memberRequiredPhase)
|
||||
if (withForcedTypeCalculator) return FirScopeWithFakeOverrideTypeCalculator(scope, FakeOverrideTypeCalculator.Forced)
|
||||
if (withForcedTypeCalculator) return FirScopeWithCallableCopyReturnTypeUpdater(scope, CallableCopyTypeCalculator.Forced)
|
||||
return scope
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ fun debugCollectOverrides(symbol: FirCallableSymbol<*>, session: FirSession, sco
|
||||
val scope = symbol.dispatchReceiverType?.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
) ?: return emptyMap()
|
||||
|
||||
|
||||
+14
-16
@@ -16,7 +16,7 @@ import org.jetbrains.kotlin.fir.originalForSubstitutionOverride
|
||||
import org.jetbrains.kotlin.fir.resolve.ScopeSessionKey
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.chain
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideSubstitution
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopySubstitution
|
||||
import org.jetbrains.kotlin.fir.scopes.FirTypeScope
|
||||
import org.jetbrains.kotlin.fir.scopes.ProcessorAction
|
||||
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
|
||||
@@ -127,9 +127,8 @@ class FirClassSubstitutionScope(
|
||||
|
||||
val symbolForOverride = FirFakeOverrideGenerator.createSymbolForSubstitutionOverride(original, newOwnerClassId)
|
||||
|
||||
val (newTypeParameters, newDispatchReceiverType, newReceiverType, newReturnType, newSubstitutor, fakeOverrideSubstitution) = createSubstitutedData(
|
||||
member, symbolForOverride
|
||||
)
|
||||
val (newTypeParameters, newDispatchReceiverType, newReceiverType, newReturnType, newSubstitutor, callableCopySubstitution) =
|
||||
createSubstitutedData(member, symbolForOverride)
|
||||
val newParameterTypes = member.valueParameters.map {
|
||||
it.returnTypeRef.coneType.substitute(newSubstitutor)
|
||||
}
|
||||
@@ -142,7 +141,7 @@ class FirClassSubstitutionScope(
|
||||
newReturnType == null &&
|
||||
newParameterTypes.all { it == null } &&
|
||||
newTypeParameters === member.typeParameters &&
|
||||
fakeOverrideSubstitution == null &&
|
||||
callableCopySubstitution == null &&
|
||||
newContextReceiverTypes.all { it == null }
|
||||
) {
|
||||
if (original.dispatchReceiverType?.substitute(substitutor) != null) {
|
||||
@@ -177,7 +176,7 @@ class FirClassSubstitutionScope(
|
||||
newParameterTypes,
|
||||
newTypeParameters as List<FirTypeParameter>,
|
||||
makeExpect,
|
||||
fakeOverrideSubstitution
|
||||
callableCopySubstitution
|
||||
)
|
||||
}
|
||||
|
||||
@@ -187,7 +186,7 @@ class FirClassSubstitutionScope(
|
||||
val constructor = original.fir
|
||||
|
||||
val symbolForOverride = FirConstructorSymbol(original.callableId)
|
||||
val (newTypeParameters, _, _, newReturnType, newSubstitutor, fakeOverrideSubstitution) =
|
||||
val (newTypeParameters, _, _, newReturnType, newSubstitutor, callableCopySubstitution) =
|
||||
createSubstitutedData(constructor, symbolForOverride)
|
||||
|
||||
// If constructor has a dispatch receiver, it should be an inner class' constructor.
|
||||
@@ -224,7 +223,7 @@ class FirClassSubstitutionScope(
|
||||
newContextReceiverTypes,
|
||||
newTypeParameters,
|
||||
makeExpect,
|
||||
fakeOverrideSubstitution
|
||||
callableCopySubstitution
|
||||
).symbol
|
||||
}
|
||||
|
||||
@@ -236,9 +235,8 @@ class FirClassSubstitutionScope(
|
||||
|
||||
val symbolForOverride = FirFakeOverrideGenerator.createSymbolForSubstitutionOverride(original, newOwnerClassId)
|
||||
|
||||
val (newTypeParameters, newDispatchReceiverType, newReceiverType, newReturnType, _, fakeOverrideSubstitution) = createSubstitutedData(
|
||||
member, symbolForOverride
|
||||
)
|
||||
val (newTypeParameters, newDispatchReceiverType, newReceiverType, newReturnType, _, callableCopySubstitutionForTypeUpdater) =
|
||||
createSubstitutedData(member, symbolForOverride)
|
||||
|
||||
val newContextReceiverTypes = member.contextReceivers.map {
|
||||
it.typeRef.coneType.substitute(substitutor)
|
||||
@@ -247,7 +245,7 @@ class FirClassSubstitutionScope(
|
||||
if (newReceiverType == null &&
|
||||
newReturnType == null &&
|
||||
newTypeParameters === member.typeParameters &&
|
||||
fakeOverrideSubstitution == null &&
|
||||
callableCopySubstitutionForTypeUpdater == null &&
|
||||
newContextReceiverTypes.all { it == null }
|
||||
) {
|
||||
if (original.dispatchReceiverType?.substitute(substitutor) != null) {
|
||||
@@ -277,7 +275,7 @@ class FirClassSubstitutionScope(
|
||||
newReturnType,
|
||||
newTypeParameters as List<FirTypeParameter>,
|
||||
makeExpect,
|
||||
fakeOverrideSubstitution
|
||||
callableCopySubstitutionForTypeUpdater
|
||||
)
|
||||
}
|
||||
|
||||
@@ -287,7 +285,7 @@ class FirClassSubstitutionScope(
|
||||
val receiverType: ConeKotlinType?,
|
||||
val returnType: ConeKotlinType?,
|
||||
val substitutor: ConeSubstitutor,
|
||||
val fakeOverrideSubstitution: FakeOverrideSubstitution?
|
||||
val callableCopySubstitution: CallableCopySubstitution?
|
||||
)
|
||||
|
||||
private fun createSubstitutedData(member: FirCallableDeclaration, symbolForOverride: FirBasedSymbol<*>): SubstitutedData {
|
||||
@@ -309,7 +307,7 @@ class FirClassSubstitutionScope(
|
||||
val newDispatchReceiverType = dispatchReceiverTypeForSubstitutedMembers.substitute(substitutor)
|
||||
|
||||
val returnType = member.returnTypeRef.coneTypeSafe<ConeKotlinType>()
|
||||
val fakeOverrideSubstitution = runIf(returnType == null) { FakeOverrideSubstitution(substitutor, member.symbol) }
|
||||
val callableCopySubstitution = runIf(returnType == null) { CallableCopySubstitution(substitutor, member.symbol) }
|
||||
val newReturnType = returnType?.substitute(substitutor)
|
||||
return SubstitutedData(
|
||||
newTypeParameters,
|
||||
@@ -317,7 +315,7 @@ class FirClassSubstitutionScope(
|
||||
newReceiverType,
|
||||
newReturnType,
|
||||
substitutor,
|
||||
fakeOverrideSubstitution
|
||||
callableCopySubstitution
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class FirDelegatedMemberScope(
|
||||
private fun buildScope(delegateField: FirField): FirTypeScope? = delegateField.symbol.resolvedReturnType.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.Forced,
|
||||
CallableCopyTypeCalculator.Forced,
|
||||
requiredMembersPhase = null,
|
||||
)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.fir.expressions.FirOperationNameConventions
|
||||
import org.jetbrains.kotlin.fir.moduleData
|
||||
import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.FirTypeScope
|
||||
import org.jetbrains.kotlin.fir.scopes.ProcessorAction
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
@@ -65,7 +65,7 @@ class FirDynamicScope @FirDynamicScopeConstructor constructor(
|
||||
session.builtinTypes.anyType.type.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = null,
|
||||
)
|
||||
}
|
||||
|
||||
+47
-41
@@ -17,8 +17,8 @@ import org.jetbrains.kotlin.fir.declarations.utils.*
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ChainedSubstitutor
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideSubstitution
|
||||
import org.jetbrains.kotlin.fir.scopes.fakeOverrideSubstitution
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopySubstitution
|
||||
import org.jetbrains.kotlin.fir.scopes.callableCopySubstitutionForTypeUpdater
|
||||
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
|
||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
@@ -44,11 +44,13 @@ object FirFakeOverrideGenerator {
|
||||
newParameterTypes: List<ConeKotlinType?>? = null,
|
||||
newTypeParameters: List<FirTypeParameter>? = null,
|
||||
isExpect: Boolean = baseFunction.isExpect,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution? = null
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution? = null
|
||||
): FirNamedFunctionSymbol {
|
||||
createSubstitutionOverrideFunction(
|
||||
symbolForSubstitutionOverride, session, baseFunction, derivedClassLookupTag, newDispatchReceiverType, newReceiverType,
|
||||
newContextReceiverTypes, newReturnType, newParameterTypes, newTypeParameters, isExpect, fakeOverrideSubstitution, origin,
|
||||
symbolForSubstitutionOverride, session, baseFunction, derivedClassLookupTag,
|
||||
newDispatchReceiverType, newReceiverType, newContextReceiverTypes,
|
||||
newReturnType, newParameterTypes, newTypeParameters,
|
||||
isExpect, callableCopySubstitutionForTypeUpdater, origin,
|
||||
)
|
||||
return symbolForSubstitutionOverride
|
||||
}
|
||||
@@ -73,7 +75,7 @@ object FirFakeOverrideGenerator {
|
||||
newParameterTypes: List<ConeKotlinType?>?,
|
||||
newTypeParameters: List<FirTypeParameter>?,
|
||||
isExpect: Boolean = baseFunction.isExpect,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution?,
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution?,
|
||||
origin: FirDeclarationOrigin.SubstitutionOverride,
|
||||
): FirSimpleFunction {
|
||||
// TODO: consider using here some light-weight functions instead of pseudo-real FirMemberFunctionImpl
|
||||
@@ -91,7 +93,7 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType,
|
||||
newContextReceiverTypes,
|
||||
newReturnType,
|
||||
fakeOverrideSubstitution = fakeOverrideSubstitution
|
||||
callableCopySubstitutionForTypeUpdater = callableCopySubstitutionForTypeUpdater
|
||||
).apply {
|
||||
originalForSubstitutionOverrideAttr = baseFunction
|
||||
}
|
||||
@@ -112,7 +114,7 @@ object FirFakeOverrideGenerator {
|
||||
newReturnType: ConeKotlinType? = null,
|
||||
newModality: Modality? = null,
|
||||
newVisibility: Visibility? = null,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution? = null
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution? = null
|
||||
): FirSimpleFunction {
|
||||
checkStatusIsResolved(baseFunction)
|
||||
|
||||
@@ -129,7 +131,7 @@ object FirFakeOverrideGenerator {
|
||||
attributes = baseFunction.attributes.copy()
|
||||
typeParameters += configureAnnotationsTypeParametersAndSignature(
|
||||
session, baseFunction, newParameterTypes, newTypeParameters,
|
||||
newReceiverType, newContextReceiverTypes, newReturnType, fakeOverrideSubstitution, newSymbol
|
||||
newReceiverType, newContextReceiverTypes, newReturnType, callableCopySubstitutionForTypeUpdater, newSymbol
|
||||
).filterIsInstance<FirTypeParameter>()
|
||||
deprecationsProvider = baseFunction.deprecationsProvider
|
||||
}.apply {
|
||||
@@ -149,7 +151,7 @@ object FirFakeOverrideGenerator {
|
||||
newContextReceiverTypes: List<ConeKotlinType?>?,
|
||||
newTypeParameters: List<FirTypeParameterRef>?,
|
||||
isExpect: Boolean,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution?
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution?
|
||||
): FirConstructor {
|
||||
checkStatusIsResolved(baseConstructor)
|
||||
|
||||
@@ -176,7 +178,7 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType = null,
|
||||
newContextReceiverTypes,
|
||||
newReturnType,
|
||||
fakeOverrideSubstitution,
|
||||
callableCopySubstitutionForTypeUpdater,
|
||||
fakeOverrideSymbol
|
||||
)
|
||||
|
||||
@@ -200,7 +202,7 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType: ConeKotlinType?,
|
||||
newContextReceiverTypes: List<ConeKotlinType?>?,
|
||||
newReturnType: ConeKotlinType?,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution?,
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution?,
|
||||
symbolForOverride: FirFunctionSymbol<*>,
|
||||
): List<FirTypeParameterRef> {
|
||||
return when {
|
||||
@@ -212,7 +214,7 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType,
|
||||
newContextReceiverTypes,
|
||||
newReturnType,
|
||||
fakeOverrideSubstitution,
|
||||
callableCopySubstitutionForTypeUpdater,
|
||||
origin,
|
||||
)
|
||||
emptyList()
|
||||
@@ -228,9 +230,9 @@ object FirFakeOverrideGenerator {
|
||||
val (copiedReceiverType, copiedContextReceiverTypes, possibleReturnType) = substituteReceiverAndReturnType(
|
||||
baseFunction as FirCallableDeclaration, newReceiverType, newContextReceiverTypes, newReturnType, substitutor
|
||||
)
|
||||
val (copiedReturnType, newFakeOverrideSubstitution) = when (possibleReturnType) {
|
||||
val (copiedReturnType, newCallableCopySubstitutionForTypeUpdater) = when (possibleReturnType) {
|
||||
is Maybe.Value -> possibleReturnType.value to null
|
||||
else -> null to FakeOverrideSubstitution(substitutor, symbol)
|
||||
else -> null to CallableCopySubstitution(substitutor, symbol)
|
||||
}
|
||||
configureAnnotationsAndSignature(
|
||||
baseFunction,
|
||||
@@ -239,7 +241,7 @@ object FirFakeOverrideGenerator {
|
||||
copiedReceiverType,
|
||||
copiedContextReceiverTypes,
|
||||
copiedReturnType,
|
||||
newFakeOverrideSubstitution,
|
||||
newCallableCopySubstitutionForTypeUpdater,
|
||||
origin,
|
||||
)
|
||||
copiedTypeParameters
|
||||
@@ -252,7 +254,7 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType,
|
||||
newContextReceiverTypes,
|
||||
newReturnType,
|
||||
fakeOverrideSubstitution,
|
||||
callableCopySubstitutionForTypeUpdater,
|
||||
origin,
|
||||
)
|
||||
newTypeParameters
|
||||
@@ -267,19 +269,20 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType: ConeKotlinType?,
|
||||
newContextReceiverTypes: List<ConeKotlinType?>?,
|
||||
newReturnType: ConeKotlinType?,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution?,
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution?,
|
||||
origin: FirDeclarationOrigin,
|
||||
) {
|
||||
annotations += baseFunction.annotations
|
||||
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val fakeOverrideSubstitution = fakeOverrideSubstitution ?: runIf(baseFunction.returnTypeRef is FirImplicitTypeRef) {
|
||||
FakeOverrideSubstitution(ConeSubstitutor.Empty, baseFunction.symbol)
|
||||
}
|
||||
val callableCopySubstitutionForTypeUpdater = callableCopySubstitutionForTypeUpdater
|
||||
?: runIf(baseFunction.returnTypeRef is FirImplicitTypeRef) {
|
||||
CallableCopySubstitution(ConeSubstitutor.Empty, baseFunction.symbol)
|
||||
}
|
||||
|
||||
if (fakeOverrideSubstitution != null) {
|
||||
if (callableCopySubstitutionForTypeUpdater != null) {
|
||||
returnTypeRef = FirImplicitTypeRefImplWithoutSource
|
||||
attributes.fakeOverrideSubstitution = fakeOverrideSubstitution
|
||||
attributes.callableCopySubstitutionForTypeUpdater = callableCopySubstitutionForTypeUpdater
|
||||
} else {
|
||||
returnTypeRef = baseFunction.returnTypeRef.withReplacedReturnType(newReturnType)
|
||||
}
|
||||
@@ -325,12 +328,12 @@ object FirFakeOverrideGenerator {
|
||||
newReturnType: ConeKotlinType? = null,
|
||||
newTypeParameters: List<FirTypeParameter>? = null,
|
||||
isExpect: Boolean = baseProperty.isExpect,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution? = null
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution? = null
|
||||
): FirPropertySymbol {
|
||||
createCopyForFirProperty(
|
||||
symbolForSubstitutionOverride, baseProperty, derivedClassLookupTag, session, origin,
|
||||
isExpect, newDispatchReceiverType, newTypeParameters, newReceiverType, newContextReceiverTypes, newReturnType,
|
||||
fakeOverrideSubstitution = fakeOverrideSubstitution
|
||||
callableCopySubstitutionForTypeUpdater = callableCopySubstitutionForTypeUpdater
|
||||
).apply {
|
||||
originalForSubstitutionOverrideAttr = baseProperty
|
||||
}
|
||||
@@ -359,7 +362,7 @@ object FirFakeOverrideGenerator {
|
||||
newReturnType: ConeKotlinType? = null,
|
||||
newModality: Modality? = null,
|
||||
newVisibility: Visibility? = null,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution? = null
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution? = null
|
||||
): FirProperty {
|
||||
checkStatusIsResolved(baseProperty)
|
||||
|
||||
@@ -383,7 +386,7 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType,
|
||||
newContextReceiverTypes,
|
||||
newReturnType,
|
||||
fakeOverrideSubstitution
|
||||
callableCopySubstitutionForTypeUpdater
|
||||
)
|
||||
deprecationsProvider = baseProperty.deprecationsProvider
|
||||
|
||||
@@ -510,7 +513,7 @@ object FirFakeOverrideGenerator {
|
||||
newReturnType: ConeKotlinType? = null,
|
||||
newModality: Modality? = null,
|
||||
newVisibility: Visibility? = null,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution? = null
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution? = null
|
||||
): FirField {
|
||||
return buildField {
|
||||
source = baseField.source
|
||||
@@ -525,7 +528,8 @@ object FirFakeOverrideGenerator {
|
||||
dispatchReceiverType = newDispatchReceiverType
|
||||
attributes = baseField.attributes.copy()
|
||||
configureAnnotationsAndSignature(
|
||||
baseField, newReceiverType, newContextReceiverTypes, newReturnType, fakeOverrideSubstitution, updateReceiver = false
|
||||
baseField, newReceiverType, newContextReceiverTypes, newReturnType,
|
||||
callableCopySubstitutionForTypeUpdater, updateReceiver = false
|
||||
)
|
||||
deprecationsProvider = baseField.deprecationsProvider
|
||||
}.apply {
|
||||
@@ -540,12 +544,12 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType: ConeKotlinType?,
|
||||
newContextReceiverTypes: List<ConeKotlinType?>?,
|
||||
newReturnType: ConeKotlinType?,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution?
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution?
|
||||
): List<FirTypeParameter> {
|
||||
return when {
|
||||
baseProperty.typeParameters.isEmpty() -> {
|
||||
configureAnnotationsAndSignature(
|
||||
baseProperty, newReceiverType, newContextReceiverTypes, newReturnType, fakeOverrideSubstitution
|
||||
baseProperty, newReceiverType, newContextReceiverTypes, newReturnType, callableCopySubstitutionForTypeUpdater
|
||||
)
|
||||
emptyList()
|
||||
}
|
||||
@@ -556,18 +560,19 @@ object FirFakeOverrideGenerator {
|
||||
val (copiedReceiverType, copiedContextReceiverTypes, possibleReturnType) = substituteReceiverAndReturnType(
|
||||
baseProperty, newReceiverType, newContextReceiverTypes, newReturnType, substitutor
|
||||
)
|
||||
val (copiedReturnType, newFakeOverrideSubstitution) = when (possibleReturnType) {
|
||||
val (copiedReturnType, newCallableCopySubstitutionForTypeUpdater) = when (possibleReturnType) {
|
||||
is Maybe.Value -> possibleReturnType.value to null
|
||||
else -> null to FakeOverrideSubstitution(substitutor, baseProperty.symbol)
|
||||
else -> null to CallableCopySubstitution(substitutor, baseProperty.symbol)
|
||||
}
|
||||
configureAnnotationsAndSignature(
|
||||
baseProperty, copiedReceiverType, copiedContextReceiverTypes, copiedReturnType, newFakeOverrideSubstitution
|
||||
baseProperty, copiedReceiverType, copiedContextReceiverTypes,
|
||||
copiedReturnType, newCallableCopySubstitutionForTypeUpdater
|
||||
)
|
||||
copiedTypeParameters.filterIsInstance<FirTypeParameter>()
|
||||
}
|
||||
else -> {
|
||||
configureAnnotationsAndSignature(
|
||||
baseProperty, newReceiverType, newContextReceiverTypes, newReturnType, fakeOverrideSubstitution
|
||||
baseProperty, newReceiverType, newContextReceiverTypes, newReturnType, callableCopySubstitutionForTypeUpdater
|
||||
)
|
||||
newTypeParameters
|
||||
}
|
||||
@@ -611,19 +616,20 @@ object FirFakeOverrideGenerator {
|
||||
newReceiverType: ConeKotlinType?,
|
||||
newContextReceiverTypes: List<ConeKotlinType?>?,
|
||||
newReturnType: ConeKotlinType?,
|
||||
fakeOverrideSubstitution: FakeOverrideSubstitution?,
|
||||
callableCopySubstitutionForTypeUpdater: CallableCopySubstitution?,
|
||||
updateReceiver: Boolean = true
|
||||
) {
|
||||
annotations += baseVariable.annotations
|
||||
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val fakeOverrideSubstitution = fakeOverrideSubstitution ?: runIf(baseVariable.returnTypeRef is FirImplicitTypeRef) {
|
||||
FakeOverrideSubstitution(ConeSubstitutor.Empty, baseVariable.symbol)
|
||||
}
|
||||
val callableCopySubstitutionForTypeUpdater = callableCopySubstitutionForTypeUpdater
|
||||
?: runIf(baseVariable.returnTypeRef is FirImplicitTypeRef) {
|
||||
CallableCopySubstitution(ConeSubstitutor.Empty, baseVariable.symbol)
|
||||
}
|
||||
|
||||
if (fakeOverrideSubstitution != null) {
|
||||
if (callableCopySubstitutionForTypeUpdater != null) {
|
||||
returnTypeRef = FirImplicitTypeRefImplWithoutSource
|
||||
attributes.fakeOverrideSubstitution = fakeOverrideSubstitution
|
||||
attributes.callableCopySubstitutionForTypeUpdater = callableCopySubstitutionForTypeUpdater
|
||||
} else {
|
||||
returnTypeRef = baseVariable.returnTypeRef.withReplacedReturnType(newReturnType)
|
||||
}
|
||||
|
||||
+2
-4
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.scopeSessionKey
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.FirTypeScope
|
||||
import org.jetbrains.kotlin.fir.scopes.ProcessorAction
|
||||
import org.jetbrains.kotlin.fir.scopes.getFunctions
|
||||
@@ -21,9 +21,7 @@ import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef
|
||||
import org.jetbrains.kotlin.fir.utils.exceptions.withConeTypeEntry
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.utils.exceptions.errorWithAttachment
|
||||
import kotlin.contracts.ExperimentalContracts
|
||||
import kotlin.contracts.contract
|
||||
|
||||
@@ -41,7 +39,7 @@ class FirIntegerConstantOperatorScope(
|
||||
baseType.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
) ?: Empty
|
||||
}
|
||||
|
||||
+10
-4
@@ -8,16 +8,22 @@ package org.jetbrains.kotlin.fir.scopes.impl
|
||||
import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration
|
||||
import org.jetbrains.kotlin.fir.isDelegated
|
||||
import org.jetbrains.kotlin.fir.isSubstitutionOrIntersectionOverride
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.FirDelegatingTypeScope
|
||||
import org.jetbrains.kotlin.fir.scopes.FirTypeScope
|
||||
import org.jetbrains.kotlin.fir.scopes.ProcessorAction
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
class FirScopeWithFakeOverrideTypeCalculator(
|
||||
/**
|
||||
* This scope is a wrapper which is intended to use with scopes that can create callable copies.
|
||||
*
|
||||
* The main purpose of this scope is to update dispatched callables return types
|
||||
* in case it is not yet calculated due to implicit body resolve logic.
|
||||
*/
|
||||
class FirScopeWithCallableCopyReturnTypeUpdater(
|
||||
private val delegate: FirTypeScope,
|
||||
private val fakeOverrideTypeCalculator: FakeOverrideTypeCalculator
|
||||
private val callableCopyTypeCalculator: CallableCopyTypeCalculator
|
||||
) : FirDelegatingTypeScope(delegate) {
|
||||
override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) {
|
||||
delegate.processFunctionsByName(name) {
|
||||
@@ -55,7 +61,7 @@ class FirScopeWithFakeOverrideTypeCalculator(
|
||||
|
||||
private fun updateReturnType(declaration: FirCallableDeclaration) {
|
||||
if (declaration.isSubstitutionOrIntersectionOverride || declaration.isDelegated) {
|
||||
fakeOverrideTypeCalculator.computeReturnType(declaration)
|
||||
callableCopyTypeCalculator.computeReturnType(declaration)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.fullyExpandedType
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.ProcessorAction
|
||||
import org.jetbrains.kotlin.fir.scopes.processOverriddenFunctions
|
||||
import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope
|
||||
@@ -191,16 +191,16 @@ fun ConeKotlinType.findContributedInvokeSymbol(
|
||||
): FirFunctionSymbol<*>? {
|
||||
val baseInvokeSymbol = expectedFunctionType.findBaseInvokeSymbol(session, scopeSession) ?: return null
|
||||
|
||||
val fakeOverrideTypeCalculator = if (shouldCalculateReturnTypesOfFakeOverrides) {
|
||||
FakeOverrideTypeCalculator.Forced
|
||||
val callableCopyTypeCalculator = if (shouldCalculateReturnTypesOfFakeOverrides) {
|
||||
CallableCopyTypeCalculator.Forced
|
||||
} else {
|
||||
FakeOverrideTypeCalculator.DoNothing
|
||||
CallableCopyTypeCalculator.DoNothing
|
||||
}
|
||||
|
||||
val scope = scope(
|
||||
useSiteSession = session,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = fakeOverrideTypeCalculator,
|
||||
callableCopyTypeCalculator = callableCopyTypeCalculator,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
) ?: return null
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ import org.jetbrains.kotlin.fir.resolve.*
|
||||
import org.jetbrains.kotlin.fir.resolve.diagnostics.ConeUnsupportedCallableReferenceTarget
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.extractInputOutputTypesFromCallableReferenceExpectedType
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.model.ConeArgumentConstraintPosition
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.utils.exceptions.withConeTypeEntry
|
||||
@@ -176,7 +176,7 @@ private fun BodyResolveComponents.getCallableReferenceAdaptation(
|
||||
val originScope = function.dispatchReceiverType?.scope(
|
||||
useSiteSession = session,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.isInner
|
||||
import org.jetbrains.kotlin.fir.resolve.*
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.FirScope
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.TypeAliasConstructorsSubstitutingScope
|
||||
import org.jetbrains.kotlin.fir.scopes.processClassifiersByName
|
||||
@@ -172,7 +172,7 @@ private fun processConstructors(
|
||||
val basicScope = type.scope(
|
||||
session,
|
||||
bodyResolveComponents.scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.kotlin.fir.references.FirNamedReference
|
||||
import org.jetbrains.kotlin.fir.resolve.BodyResolveComponents
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.unwrapFakeOverrides
|
||||
@@ -132,7 +132,7 @@ private fun BodyResolveComponents.getFunctionMembers(type: ConeKotlinType, name:
|
||||
type.scope(
|
||||
useSiteSession = session,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)?.processFunctionsByName(name) { add(it.fir) }
|
||||
}
|
||||
@@ -142,7 +142,7 @@ private fun BodyResolveComponents.getPropertyMembers(type: ConeKotlinType, name:
|
||||
type.scope(
|
||||
useSiteSession = session,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)?.processPropertiesByName(name) { addIfNotNull(it.fir as? FirVariable) }
|
||||
}
|
||||
|
||||
+2
-2
@@ -90,7 +90,7 @@ class MemberScopeTowerLevel(
|
||||
?.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
bodyResolveComponents.returnTypeCalculator.fakeOverrideTypeCalculator,
|
||||
bodyResolveComponents.returnTypeCalculator.callableCopyTypeCalculator,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)
|
||||
|
||||
@@ -135,7 +135,7 @@ class MemberScopeTowerLevel(
|
||||
useSiteForSyntheticScope = typeForSyntheticScope.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
) ?: errorWithAttachment("No scope for flexible type scope, while it's not null") {
|
||||
withConeTypeEntry("dispatchReceiverType", dispatchReceiverType)
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ 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.CallableCopyTypeCalculator
|
||||
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
|
||||
@@ -223,7 +223,7 @@ class FirCallCompletionResultsWriterTransformer(
|
||||
updatedDispatchReceiverType.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
FirResolvePhase.STATUS
|
||||
) as? FirClassSubstitutionScope ?: return null
|
||||
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.fullyExpandedType
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.resultType
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.getFunctions
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.originalForWrappedIntegerOperator
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol
|
||||
@@ -49,7 +49,7 @@ class IntegerLiteralAndOperatorApproximationTransformer(
|
||||
return receiverType.type.scope(
|
||||
useSiteSession = session,
|
||||
scopeSession = scopeSession,
|
||||
fakeOverrideTypeCalculator = FakeOverrideTypeCalculator.DoNothing,
|
||||
callableCopyTypeCalculator = CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
)!!.getFunctions(name).single()
|
||||
}
|
||||
|
||||
+9
-10
@@ -22,15 +22,14 @@ import org.jetbrains.kotlin.fir.resolve.transformers.FirTransformerBasedResolveP
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.ReturnTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.ReturnTypeCalculatorForFullBodyResolve
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.contracts.runContractResolveForLocalClass
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.fakeOverrideSubstitution
|
||||
import org.jetbrains.kotlin.fir.scopes.CallableCopyTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.scopes.callableCopySubstitutionForTypeUpdater
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.originalForWrappedIntegerOperator
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirSyntheticPropertySymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||
import org.jetbrains.kotlin.fir.types.FirImplicitTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
import org.jetbrains.kotlin.util.PrivateForInline
|
||||
@@ -178,7 +177,7 @@ open class ReturnTypeCalculatorWithJump(
|
||||
val designationMapForLocalClasses: Map<FirCallableDeclaration, List<FirClassLikeDeclaration>> = mapOf(),
|
||||
private val nonLocalDeclarationResolver: ReturnTypeCalculatorWithJump? = null,
|
||||
) : ReturnTypeCalculator() {
|
||||
override val fakeOverrideTypeCalculator: FakeOverrideTypeCalculator = FakeOverrideTypeCalculatorWithJump()
|
||||
override val callableCopyTypeCalculator: CallableCopyTypeCalculator = CallableCopyTypeCalculatorWithJump()
|
||||
|
||||
@OptIn(PrivateForInline::class)
|
||||
var outerBodyResolveContext: BodyResolveContext? = null
|
||||
@@ -230,16 +229,16 @@ open class ReturnTypeCalculatorWithJump(
|
||||
}
|
||||
|
||||
if (declaration.isSubstitutionOrIntersectionOverride) {
|
||||
val fakeOverrideSubstitution = declaration.attributes.fakeOverrideSubstitution
|
||||
val callableCopySubstitutionForTypeUpdater = declaration.attributes.callableCopySubstitutionForTypeUpdater
|
||||
?: return declaration.returnTypeRef as FirResolvedTypeRef
|
||||
|
||||
// TODO: drop synchronized in KT-60385
|
||||
synchronized(fakeOverrideSubstitution) {
|
||||
if (declaration.attributes.fakeOverrideSubstitution == null) {
|
||||
synchronized(callableCopySubstitutionForTypeUpdater) {
|
||||
if (declaration.attributes.callableCopySubstitutionForTypeUpdater == null) {
|
||||
return declaration.returnTypeRef as FirResolvedTypeRef
|
||||
}
|
||||
|
||||
val (substitutor, baseSymbol) = fakeOverrideSubstitution
|
||||
val (substitutor, baseSymbol) = callableCopySubstitutionForTypeUpdater
|
||||
val baseDeclaration = baseSymbol.fir as FirCallableDeclaration
|
||||
val baseReturnTypeRef = tryCalculateReturnType(baseDeclaration)
|
||||
val baseReturnType = baseReturnTypeRef.type
|
||||
@@ -251,7 +250,7 @@ open class ReturnTypeCalculatorWithJump(
|
||||
declaration.setter?.valueParameters?.firstOrNull()?.replaceReturnTypeRef(returnType)
|
||||
}
|
||||
|
||||
declaration.attributes.fakeOverrideSubstitution = null
|
||||
declaration.attributes.callableCopySubstitutionForTypeUpdater = null
|
||||
return returnType
|
||||
}
|
||||
}
|
||||
@@ -340,7 +339,7 @@ open class ReturnTypeCalculatorWithJump(
|
||||
return newReturnTypeRef
|
||||
}
|
||||
|
||||
private inner class FakeOverrideTypeCalculatorWithJump : FakeOverrideTypeCalculator.AbstractFakeOverrideTypeCalculator() {
|
||||
private inner class CallableCopyTypeCalculatorWithJump : CallableCopyTypeCalculator.AbstractCallableCopyTypeCalculator() {
|
||||
override fun FirCallableDeclaration.getResolvedTypeRef(): FirResolvedTypeRef? {
|
||||
return this@ReturnTypeCalculatorWithJump.computeReturnTypeRef(this)
|
||||
}
|
||||
|
||||
+2
-2
@@ -178,7 +178,7 @@ class FirExpectActualMatchingContextImpl private constructor(
|
||||
val scope = symbol.defaultType().scope(
|
||||
useSiteSession = session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
) ?: return emptyList()
|
||||
|
||||
@@ -204,7 +204,7 @@ class FirExpectActualMatchingContextImpl private constructor(
|
||||
val scope = symbol.defaultType().scope(
|
||||
useSiteSession = symbol.moduleData.session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
CallableCopyTypeCalculator.DoNothing,
|
||||
requiredMembersPhase = FirResolvePhase.STATUS,
|
||||
) ?: return emptyList()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user