[FIR] Get FirSession from declaration in ReturnTypeCalculatorWithJump
If the session is from the other module, it might not know about FirFiles which are relevant for transforming and resolving the declaration ^KT-52136 Fixed
This commit is contained in:
-1
@@ -15,7 +15,6 @@ import org.jetbrains.kotlin.analysis.low.level.api.fir.element.builder.LLFirDesi
|
||||
internal object PersistentCheckerContextFactory {
|
||||
fun createEmptyPersistenceCheckerContext(sessionHolder: SessionHolder): PersistentCheckerContext {
|
||||
val returnTypeCalculator = createReturnTypeCalculatorForIDE(
|
||||
sessionHolder.session,
|
||||
sessionHolder.scopeSession,
|
||||
ImplicitBodyResolveComputationSession(),
|
||||
::LLFirDesignatedImpliciteTypesBodyResolveTransformerForReturnTypeCalculator
|
||||
|
||||
-1
@@ -36,7 +36,6 @@ internal class LLFirDesignatedBodyResolveTransformer(
|
||||
implicitTypeOnly = false,
|
||||
scopeSession = scopeSession,
|
||||
returnTypeCalculator = createReturnTypeCalculatorForIDE(
|
||||
session,
|
||||
scopeSession,
|
||||
ImplicitBodyResolveComputationSession(),
|
||||
::LLFirEnsureBasedTransformerForReturnTypeCalculator
|
||||
|
||||
-1
@@ -38,7 +38,6 @@ internal class LLFirDesignatedImplicitTypesTransformer(
|
||||
scopeSession = scopeSession,
|
||||
firTowerDataContextCollector = towerDataContextCollector,
|
||||
returnTypeCalculator = createReturnTypeCalculatorForIDE(
|
||||
session,
|
||||
scopeSession,
|
||||
implicitBodyResolveComputationSession,
|
||||
::LLFirDesignatedImpliciteTypesBodyResolveTransformerForReturnTypeCalculator
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ internal class LLFirFileAnnotationsResolveTransformer(
|
||||
implicitTypeOnly = false,
|
||||
scopeSession = scopeSession,
|
||||
returnTypeCalculator = createReturnTypeCalculatorForIDE(
|
||||
session,
|
||||
scopeSession,
|
||||
implicitBodyResolveComputationSession,
|
||||
::LLFirDesignatedImpliciteTypesBodyResolveTransformerForReturnTypeCalculator
|
||||
|
||||
+6
@@ -254,6 +254,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/genericReceiverPropertyOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitTypeFromOtherModule.kt")
|
||||
public void testImplicitTypeFromOtherModule() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeFromOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitTypeInFakeOverride.kt")
|
||||
public void testImplicitTypeInFakeOverride() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user