diff --git a/analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/components/callResolver/Fe10IdeNormalAnalysisSourceModuleResolveCallTestGenerated.java b/analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/components/callResolver/Fe10IdeNormalAnalysisSourceModuleResolveCallTestGenerated.java index 742099d78dc..37342a8b9b1 100644 --- a/analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/components/callResolver/Fe10IdeNormalAnalysisSourceModuleResolveCallTestGenerated.java +++ b/analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/components/callResolver/Fe10IdeNormalAnalysisSourceModuleResolveCallTestGenerated.java @@ -784,6 +784,12 @@ public class Fe10IdeNormalAnalysisSourceModuleResolveCallTestGenerated extends A runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/smartCastImplicitExtensionReceiver.kt"); } + @Test + @TestMetadata("substituteOverrideResolution.kt") + public void testSubstituteOverrideResolution() throws Exception { + runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.kt"); + } + @Test @TestMetadata("superTypeCallEntryResolveToCallInfo.kt") public void testSuperTypeCallEntryResolveToCallInfo() throws Exception { diff --git a/analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/callResolver/FirIdeNormalAnalysisSourceModuleMultiModuleResolveCallTestGenerated.java b/analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/callResolver/FirIdeNormalAnalysisSourceModuleMultiModuleResolveCallTestGenerated.java new file mode 100644 index 00000000000..f47c3731694 --- /dev/null +++ b/analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/callResolver/FirIdeNormalAnalysisSourceModuleMultiModuleResolveCallTestGenerated.java @@ -0,0 +1,60 @@ +/* + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.analysis.api.fir.test.cases.generated.cases.components.callResolver; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.kotlin.analysis.api.fir.test.configurators.AnalysisApiFirTestConfiguratorFactory; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestConfiguratorFactoryData; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestConfigurator; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.TestModuleKind; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.FrontendKind; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisSessionMode; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiMode; +import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.callResolver.AbstractMultiModuleResolveCallTest; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.analysis.api.GenerateAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall") +@TestDataPath("$PROJECT_ROOT") +public class FirIdeNormalAnalysisSourceModuleMultiModuleResolveCallTestGenerated extends AbstractMultiModuleResolveCallTest { + @NotNull + @Override + public AnalysisApiTestConfigurator getConfigurator() { + return AnalysisApiFirTestConfiguratorFactory.INSTANCE.createConfigurator( + new AnalysisApiTestConfiguratorFactoryData( + FrontendKind.Fir, + TestModuleKind.Source, + AnalysisSessionMode.Normal, + AnalysisApiMode.Ide + ) + ); + } + + @Test + public void testAllFilesPresentInResolveCall() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("implicitTypeSubstituteOverrideFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideFromOtherModule() throws Exception { + runTest("analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/implicitTypeSubstituteOverrideFromOtherModule.kt"); + } + + @Test + @TestMetadata("unitTypeFromOtherModule.kt") + public void testUnitTypeFromOtherModule() throws Exception { + runTest("analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/unitTypeFromOtherModule.kt"); + } +} diff --git a/analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/callResolver/FirIdeNormalAnalysisSourceModuleResolveCallTestGenerated.java b/analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/callResolver/FirIdeNormalAnalysisSourceModuleResolveCallTestGenerated.java index bc0208f6a8a..1e842f26d1c 100644 --- a/analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/callResolver/FirIdeNormalAnalysisSourceModuleResolveCallTestGenerated.java +++ b/analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/callResolver/FirIdeNormalAnalysisSourceModuleResolveCallTestGenerated.java @@ -784,6 +784,12 @@ public class FirIdeNormalAnalysisSourceModuleResolveCallTestGenerated extends Ab runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/smartCastImplicitExtensionReceiver.kt"); } + @Test + @TestMetadata("substituteOverrideResolution.kt") + public void testSubstituteOverrideResolution() throws Exception { + runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.kt"); + } + @Test @TestMetadata("superTypeCallEntryResolveToCallInfo.kt") public void testSuperTypeCallEntryResolveToCallInfo() throws Exception { diff --git a/analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/callResolver/AbstractMultiModuleResolveCallTest.kt b/analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/callResolver/AbstractMultiModuleResolveCallTest.kt new file mode 100644 index 00000000000..d71deeb8b10 --- /dev/null +++ b/analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/callResolver/AbstractMultiModuleResolveCallTest.kt @@ -0,0 +1,45 @@ +/* + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.callResolver + +import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.analysis.api.KtAnalysisSession +import org.jetbrains.kotlin.analysis.api.calls.KtCallInfo +import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.stringRepresentation +import org.jetbrains.kotlin.analysis.test.framework.base.AbstractAnalysisApiBasedTest +import org.jetbrains.kotlin.analysis.test.framework.project.structure.ktModuleProvider +import org.jetbrains.kotlin.analysis.test.framework.services.expressionMarkerProvider +import org.jetbrains.kotlin.analysis.test.framework.utils.executeOnPooledThreadInReadAction +import org.jetbrains.kotlin.psi.KtCallElement +import org.jetbrains.kotlin.psi.KtElement +import org.jetbrains.kotlin.psi.KtExpression +import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.test.services.TestModuleStructure +import org.jetbrains.kotlin.test.services.TestServices +import org.jetbrains.kotlin.test.services.assertions + +abstract class AbstractMultiModuleResolveCallTest : AbstractAnalysisApiBasedTest() { + final override fun doTestByModuleStructure(moduleStructure: TestModuleStructure, testServices: TestServices) { + val (expression, _) = moduleStructure.modules.flatMap { module -> + val ktFiles = testServices.ktModuleProvider.getModuleFiles(module).filterIsInstance() + testServices.expressionMarkerProvider.getElementsOfTypeAtCarets(ktFiles) + }.single() + + val actual = executeOnPooledThreadInReadAction { + analyseForTest(expression) { + resolveCall(expression)?.let { stringRepresentation(it) } + } + } ?: "null" + testServices.assertions.assertEqualsToTestDataFileSibling(actual) + } + + private fun KtAnalysisSession.resolveCall(element: PsiElement): KtCallInfo? = when (element) { + is KtCallElement -> element.resolveCall() + is KtElement -> element.resolveCall() + else -> error("Selected element type (${element::class.simpleName}) is not supported for resolveCall()") + } + +} diff --git a/analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/callResolver/FirStandaloneNormalAnalysisSourceModuleMultiModuleResolveCallTestGenerated.java b/analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/callResolver/FirStandaloneNormalAnalysisSourceModuleMultiModuleResolveCallTestGenerated.java new file mode 100644 index 00000000000..adf59ff40e9 --- /dev/null +++ b/analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/callResolver/FirStandaloneNormalAnalysisSourceModuleMultiModuleResolveCallTestGenerated.java @@ -0,0 +1,60 @@ +/* + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.analysis.api.standalone.fir.test.cases.generated.cases.components.callResolver; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.kotlin.analysis.api.standalone.fir.test.AnalysisApiFirStandaloneModeTestConfiguratorFactory; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestConfiguratorFactoryData; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestConfigurator; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.TestModuleKind; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.FrontendKind; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisSessionMode; +import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiMode; +import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.callResolver.AbstractMultiModuleResolveCallTest; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.analysis.api.GenerateAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall") +@TestDataPath("$PROJECT_ROOT") +public class FirStandaloneNormalAnalysisSourceModuleMultiModuleResolveCallTestGenerated extends AbstractMultiModuleResolveCallTest { + @NotNull + @Override + public AnalysisApiTestConfigurator getConfigurator() { + return AnalysisApiFirStandaloneModeTestConfiguratorFactory.INSTANCE.createConfigurator( + new AnalysisApiTestConfiguratorFactoryData( + FrontendKind.Fir, + TestModuleKind.Source, + AnalysisSessionMode.Normal, + AnalysisApiMode.Standalone + ) + ); + } + + @Test + public void testAllFilesPresentInResolveCall() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("implicitTypeSubstituteOverrideFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideFromOtherModule() throws Exception { + runTest("analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/implicitTypeSubstituteOverrideFromOtherModule.kt"); + } + + @Test + @TestMetadata("unitTypeFromOtherModule.kt") + public void testUnitTypeFromOtherModule() throws Exception { + runTest("analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/unitTypeFromOtherModule.kt"); + } +} diff --git a/analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/callResolver/FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated.java b/analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/callResolver/FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated.java index 66d5bc61b93..c9559e3cfc1 100644 --- a/analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/callResolver/FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated.java +++ b/analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/callResolver/FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated.java @@ -784,6 +784,12 @@ public class FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated ext runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/smartCastImplicitExtensionReceiver.kt"); } + @Test + @TestMetadata("substituteOverrideResolution.kt") + public void testSubstituteOverrideResolution() throws Exception { + runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.kt"); + } + @Test @TestMetadata("superTypeCallEntryResolveToCallInfo.kt") public void testSuperTypeCallEntryResolveToCallInfo() throws Exception { diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.kt b/analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.kt new file mode 100644 index 00000000000..fd5eddc78d8 --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.kt @@ -0,0 +1,12 @@ +// WITH_STDLIB +package main + +import kotlin.collections.MutableList + +abstract class B : MutableList() {} + +fun usage(b : B?) { + if (b != null) { + b.clear() + } +} diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.txt new file mode 100644 index 00000000000..362de4f6bf5 --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/substituteOverrideResolution.txt @@ -0,0 +1,19 @@ +KtSuccessCallInfo: + call = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = KtSmartCastedReceiverValue: + original = KtExplicitReceiverValue: + expression = b + isSafeNavigation = false + type = main.B? + type = main.B + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Unit + symbol = kotlin/collections/MutableList.clear(: kotlin.collections.MutableList): kotlin.Unit + valueParameters = [] + callableIdIfNonLocal = kotlin/collections/MutableList.clear + typeArgumentsMapping = {} + argumentMapping = {} diff --git a/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/implicitTypeSubstituteOverrideFromOtherModule.kt b/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/implicitTypeSubstituteOverrideFromOtherModule.kt new file mode 100644 index 00000000000..3cd406d714d --- /dev/null +++ b/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/implicitTypeSubstituteOverrideFromOtherModule.kt @@ -0,0 +1,23 @@ +// MODULE: lib +package dependency + +abstract class A { + fun foo() = "" +} + +// MODULE: main(lib) +// FILE: B.kt +package main +import c.C +import dependency.A + +abstract class B : A() {} + +fun usage(b : B?) { + if (b != null) { + b.foo() + } +} +// FILE: C.kt +package c +class C \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/implicitTypeSubstituteOverrideFromOtherModule.txt b/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/implicitTypeSubstituteOverrideFromOtherModule.txt new file mode 100644 index 00000000000..0f97d82ca94 --- /dev/null +++ b/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/implicitTypeSubstituteOverrideFromOtherModule.txt @@ -0,0 +1,19 @@ +KtSuccessCallInfo: + call = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = KtSmartCastedReceiverValue: + original = KtExplicitReceiverValue: + expression = b + isSafeNavigation = false + type = main.B? + type = main.B + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.String + symbol = dependency/A.foo(: dependency.A): kotlin.String + valueParameters = [] + callableIdIfNonLocal = dependency/A.foo + typeArgumentsMapping = {} + argumentMapping = {} diff --git a/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/unitTypeFromOtherModule.kt b/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/unitTypeFromOtherModule.kt new file mode 100644 index 00000000000..36d0beb0a18 --- /dev/null +++ b/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/unitTypeFromOtherModule.kt @@ -0,0 +1,23 @@ +// MODULE: lib +package dependency + +abstract class A { + abstract fun foo() +} + +// MODULE: main(lib) +// FILE: B.kt +package main +import c.C +import dependency.A + +abstract class B : A() {} + +fun usage(b : B?) { + if (b != null) { + b.foo() + } +} +// FILE: C.kt +package c +class C \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/unitTypeFromOtherModule.txt b/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/unitTypeFromOtherModule.txt new file mode 100644 index 00000000000..5862ba56873 --- /dev/null +++ b/analysis/analysis-api/testData/components/multiModuleCallResolver/resolveCall/unitTypeFromOtherModule.txt @@ -0,0 +1,19 @@ +KtSuccessCallInfo: + call = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = KtSmartCastedReceiverValue: + original = KtExplicitReceiverValue: + expression = b + isSafeNavigation = false + type = main.B? + type = main.B + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Unit + symbol = dependency/A.foo(: dependency.A): kotlin.Unit + valueParameters = [] + callableIdIfNonLocal = dependency/A.foo + typeArgumentsMapping = {} + argumentMapping = {} diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java index b83ae1be1f8..a25cf765ddb 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java @@ -278,6 +278,24 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeInFakeOverride.kt"); } + @Test + @TestMetadata("implicitTypeIntersectionOverrideFromOtherModule.kt") + public void testImplicitTypeIntersectionOverrideFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.kt"); + } + + @Test + @TestMetadata("implicitTypeSubstituteOverrideFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.kt"); + } + + @Test + @TestMetadata("implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideInNestedClassFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt"); + } + @Test @TestMetadata("implicitTypeWithTypeBound.kt") public void testImplicitTypeWithTypeBound() throws Exception { @@ -638,6 +656,18 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis runTest("compiler/fir/analysis-tests/testData/resolve/typesInLocalFunctions.kt"); } + @Test + @TestMetadata("unitTypeFromOtherModule.kt") + public void testUnitTypeFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.kt"); + } + + @Test + @TestMetadata("unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt") + public void testUnitTypeSubstituteOverrideInNestedClassFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt"); + } + @Test @TestMetadata("varargInPrimaryConstructor.kt") public void testVarargInPrimaryConstructor() throws Exception { diff --git a/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java b/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java index 8e536d0c777..0b39f3cd603 100644 --- a/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java +++ b/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java @@ -239,6 +239,21 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeInFakeOverride.kt"); } + @TestMetadata("implicitTypeIntersectionOverrideFromOtherModule.kt") + public void testImplicitTypeIntersectionOverrideFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.kt"); + } + + @TestMetadata("implicitTypeSubstituteOverrideFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.kt"); + } + + @TestMetadata("implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideInNestedClassFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt"); + } + @TestMetadata("implicitTypeWithTypeBound.kt") public void testImplicitTypeWithTypeBound() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeWithTypeBound.kt"); @@ -539,6 +554,16 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract runTest("compiler/fir/analysis-tests/testData/resolve/typesInLocalFunctions.kt"); } + @TestMetadata("unitTypeFromOtherModule.kt") + public void testUnitTypeFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.kt"); + } + + @TestMetadata("unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt") + public void testUnitTypeSubstituteOverrideInNestedClassFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt"); + } + @TestMetadata("varargInPrimaryConstructor.kt") public void testVarargInPrimaryConstructor() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/varargInPrimaryConstructor.kt"); diff --git a/compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.fir.txt b/compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.fir.txt new file mode 100644 index 00000000000..6c2a0a0bd10 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.fir.txt @@ -0,0 +1,34 @@ +Module: lib +FILE: module_lib_implicitTypeIntersectionOverrideFromOtherModule.kt + package dependency + + public abstract class A : R|kotlin/Any| { + public constructor(): R|dependency/A| { + super() + } + + public abstract fun foo(): R|kotlin/Unit| + + } + public abstract interface I : R|kotlin/Any| { + public abstract fun foo(): R|kotlin/Unit| + + } +Module: main +FILE: B.kt + package main + + public abstract class B : R|dependency/A|, R|dependency/I| { + public constructor(): R|main/B| { + super() + } + + } + public final fun usage(b: R|main/B?|): R|kotlin/Unit| { + when () { + !=(R|/b|, Null(null)) -> { + R|/b|.R|dependency/A.foo|() + } + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.kt b/compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.kt new file mode 100644 index 00000000000..2f8d73175d3 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.kt @@ -0,0 +1,27 @@ +// SKIP_JAVAC +// This directive is needed to skip this test in LazyBodyIsNotTouchedTilContractsPhaseTestGenerated, +// because it fails to parse module structure of multimodule test + +// MODULE: lib +package dependency + +abstract class A { + abstract fun foo() +} +interface I { + fun foo() +} + +// MODULE: main(lib) +// FILE: B.kt +package main +import dependency.A +import dependency.I + +abstract class B : A(), I {} + +fun usage(b : B?) { + if (b != null) { + b.foo() + } +} \ No newline at end of file diff --git a/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.fir.txt b/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.fir.txt new file mode 100644 index 00000000000..ff144f9a2e0 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.fir.txt @@ -0,0 +1,41 @@ +Module: lib +FILE: module_lib_implicitTypeSubstituteOverrideFromOtherModule.kt + package dependency + + public abstract class A : R|kotlin/Any| { + public constructor(): R|dependency/A| { + super() + } + + public final fun foo(): R|kotlin/String| { + ^foo String() + } + + } +Module: main +FILE: B.kt + package main + + public abstract class B : R|dependency/A| { + public constructor(): R|main/B| { + super|>() + } + + } + public final fun usage(b: R|main/B?|): R|kotlin/Unit| { + when () { + !=(R|/b|, Null(null)) -> { + R|/b|.R|SubstitutionOverride
|() + } + } + + } +FILE: C.kt + package c + + public final class C : R|kotlin/Any| { + public constructor(): R|c/C| { + super() + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.kt b/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.kt new file mode 100644 index 00000000000..7dc29630462 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.kt @@ -0,0 +1,27 @@ +// SKIP_JAVAC +// This directive is needed to skip this test in LazyBodyIsNotTouchedTilContractsPhaseTestGenerated, +// because it fails to parse module structure of multimodule test + +// MODULE: lib +package dependency + +abstract class A { + fun foo() = "" +} + +// MODULE: main(lib) +// FILE: B.kt +package main +import c.C +import dependency.A + +abstract class B : A() {} + +fun usage(b : B?) { + if (b != null) { + b.foo() + } +} +// FILE: C.kt +package c +class C \ No newline at end of file diff --git a/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.fir.txt b/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.fir.txt new file mode 100644 index 00000000000..555daaa4bb1 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.fir.txt @@ -0,0 +1,48 @@ +Module: lib +FILE: module_lib_implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt + package dependency + + public abstract class A : R|kotlin/Any| { + public constructor(): R|dependency/A| { + super() + } + + public final fun foo(): R|kotlin/String| { + ^foo String() + } + + } +Module: main +FILE: B.kt + package main + + public final class D : R|kotlin/Any| { + public constructor(): R|main/D| { + super() + } + + public abstract class B : R|dependency/A| { + public constructor(): R|main/D.B| { + super|>() + } + + } + + } + public final fun usage(b: R|main/D.B?|): R|kotlin/Unit| { + when () { + !=(R|/b|, Null(null)) -> { + R|/b|.R|SubstitutionOverride
|() + } + } + + } +FILE: C.kt + package c + + public final class C : R|kotlin/Any| { + public constructor(): R|c/C| { + super() + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt b/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt new file mode 100644 index 00000000000..fc381cfb9f7 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt @@ -0,0 +1,29 @@ +// SKIP_JAVAC +// This directive is needed to skip this test in LazyBodyIsNotTouchedTilContractsPhaseTestGenerated, +// because it fails to parse module structure of multimodule test + +// MODULE: lib +package dependency + +abstract class A { + fun foo() = "" +} + +// MODULE: main(lib) +// FILE: B.kt +package main +import c.C +import dependency.A + +class D { + abstract class B : A() {} +} + +fun usage(b : D.B?) { + if (b != null) { + b.foo() + } +} +// FILE: C.kt +package c +class C \ No newline at end of file diff --git a/compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.fir.txt b/compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.fir.txt new file mode 100644 index 00000000000..0b52f6cecf4 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.fir.txt @@ -0,0 +1,39 @@ +Module: lib +FILE: module_lib_unitTypeFromOtherModule.kt + package dependency + + public abstract class A : R|kotlin/Any| { + public constructor(): R|dependency/A| { + super() + } + + public abstract fun foo(): R|kotlin/Unit| + + } +Module: main +FILE: B.kt + package main + + public abstract class B : R|dependency/A| { + public constructor(): R|main/B| { + super|>() + } + + } + public final fun usage(b: R|main/B?|): R|kotlin/Unit| { + when () { + !=(R|/b|, Null(null)) -> { + R|/b|.R|SubstitutionOverride
|() + } + } + + } +FILE: C.kt + package c + + public final class C : R|kotlin/Any| { + public constructor(): R|c/C| { + super() + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.kt b/compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.kt new file mode 100644 index 00000000000..63d1e808ad8 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.kt @@ -0,0 +1,27 @@ +// SKIP_JAVAC +// This directive is needed to skip this test in LazyBodyIsNotTouchedTilContractsPhaseTestGenerated, +// because it fails to parse module structure of multimodule test + +// MODULE: lib +package dependency + +abstract class A { + abstract fun foo() +} + +// MODULE: main(lib) +// FILE: B.kt +package main +import c.C +import dependency.A + +abstract class B : A() {} + +fun usage(b : B?) { + if (b != null) { + b.foo() + } +} +// FILE: C.kt +package c +class C \ No newline at end of file diff --git a/compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.fir.txt b/compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.fir.txt new file mode 100644 index 00000000000..e782c144256 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.fir.txt @@ -0,0 +1,46 @@ +Module: lib +FILE: module_lib_unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt + package dependency + + public abstract class A : R|kotlin/Any| { + public constructor(): R|dependency/A| { + super() + } + + public abstract fun foo(): R|kotlin/Unit| + + } +Module: main +FILE: B.kt + package main + + public final class D : R|kotlin/Any| { + public constructor(): R|main/D| { + super() + } + + public abstract class B : R|dependency/A| { + public constructor(): R|main/D.B| { + super|>() + } + + } + + } + public final fun usage(b: R|main/D.B?|): R|kotlin/Unit| { + when () { + !=(R|/b|, Null(null)) -> { + R|/b|.R|SubstitutionOverride
|() + } + } + + } +FILE: C.kt + package c + + public final class C : R|kotlin/Any| { + public constructor(): R|c/C| { + super() + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt b/compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt new file mode 100644 index 00000000000..0086a4e09e1 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt @@ -0,0 +1,29 @@ +// SKIP_JAVAC +// This directive is needed to skip this test in LazyBodyIsNotTouchedTilContractsPhaseTestGenerated, +// because it fails to parse module structure of multimodule test + +// MODULE: lib +package dependency + +abstract class A { + abstract fun foo() +} + +// MODULE: main(lib) +// FILE: B.kt +package main +import c.C +import dependency.A + +class D { + abstract class B : A() {} +} + +fun usage(b : D.B?) { + if (b != null) { + b.foo() + } +} +// FILE: C.kt +package c +class C diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java index f93ce2c6db8..3b08fafaf95 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java @@ -278,6 +278,24 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeInFakeOverride.kt"); } + @Test + @TestMetadata("implicitTypeIntersectionOverrideFromOtherModule.kt") + public void testImplicitTypeIntersectionOverrideFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.kt"); + } + + @Test + @TestMetadata("implicitTypeSubstituteOverrideFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.kt"); + } + + @Test + @TestMetadata("implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideInNestedClassFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt"); + } + @Test @TestMetadata("implicitTypeWithTypeBound.kt") public void testImplicitTypeWithTypeBound() throws Exception { @@ -638,6 +656,18 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { runTest("compiler/fir/analysis-tests/testData/resolve/typesInLocalFunctions.kt"); } + @Test + @TestMetadata("unitTypeFromOtherModule.kt") + public void testUnitTypeFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.kt"); + } + + @Test + @TestMetadata("unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt") + public void testUnitTypeSubstituteOverrideInNestedClassFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt"); + } + @Test @TestMetadata("varargInPrimaryConstructor.kt") public void testVarargInPrimaryConstructor() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java index 3c2b013cdf4..0eed0600047 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java @@ -278,6 +278,24 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeInFakeOverride.kt"); } + @Test + @TestMetadata("implicitTypeIntersectionOverrideFromOtherModule.kt") + public void testImplicitTypeIntersectionOverrideFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeIntersectionOverrideFromOtherModule.kt"); + } + + @Test + @TestMetadata("implicitTypeSubstituteOverrideFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideFromOtherModule.kt"); + } + + @Test + @TestMetadata("implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt") + public void testImplicitTypeSubstituteOverrideInNestedClassFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/implicitTypeSubstituteOverrideInNestedClassFromOtherModule.kt"); + } + @Test @TestMetadata("implicitTypeWithTypeBound.kt") public void testImplicitTypeWithTypeBound() throws Exception { @@ -638,6 +656,18 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/analysis-tests/testData/resolve/typesInLocalFunctions.kt"); } + @Test + @TestMetadata("unitTypeFromOtherModule.kt") + public void testUnitTypeFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/unitTypeFromOtherModule.kt"); + } + + @Test + @TestMetadata("unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt") + public void testUnitTypeSubstituteOverrideInNestedClassFromOtherModule() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/unitTypeSubstituteOverrideInNestedClassFromOtherModule.kt"); + } + @Test @TestMetadata("varargInPrimaryConstructor.kt") public void testVarargInPrimaryConstructor() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirImplicitBodyResolve.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirImplicitBodyResolve.kt index 14ee6774251..c514224d41f 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirImplicitBodyResolve.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirImplicitBodyResolve.kt @@ -285,9 +285,13 @@ private class ReturnTypeCalculatorWithJump( @OptIn(PrivateForInline::class) private fun computeReturnTypeRef(declaration: FirCallableDeclaration): FirResolvedTypeRef { + (declaration.returnTypeRef as? FirResolvedTypeRef)?.let { return it } // To properly transform and resolve declaration's type, we need to use its module's session val session = declaration.moduleData.session val symbol = declaration.symbol + require(!symbol.isSubstitutionOrIntersectionOverride) { + "fakeOverrideSubstitution was not calculated for substitution or intersection override: $symbol with ${declaration.returnTypeRef}" + } val (designation, outerBodyResolveContext) = if (declaration in designationMapForLocalClasses) { designationMapForLocalClasses.getValue(declaration) to outerBodyResolveContext diff --git a/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/analysisApi.kt b/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/analysisApi.kt index d19a547be25..28f94e5bc96 100644 --- a/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/analysisApi.kt +++ b/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/analysisApi.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.annotations.Abstra import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.annotations.AbstractAnalysisApiAnnotationsOnDeclarationsWithMetaTest import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.annotations.AbstractAnalysisApiAnnotationsOnFilesTest import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.annotations.AbstractAnalysisApiAnnotationsOnTypesTest +import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.callResolver.AbstractMultiModuleResolveCallTest import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.callResolver.AbstractResolveCallTest import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.callResolver.AbstractResolveCandidatesTest import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.compileTimeConstantProvider.AbstractCompileTimeConstantEvaluatorTest @@ -205,6 +206,17 @@ private fun AnalysisApiTestGroup.generateAnalysisApiComponentsTests() { } } + component("multiModuleCallResolver", filter = analysisSessionModeIs(AnalysisSessionMode.Normal)) { + test(AbstractMultiModuleResolveCallTest::class, filter = frontendIs(FrontendKind.Fir)) { + when (it.analysisApiMode) { + AnalysisApiMode.Ide -> + model("resolveCall") + AnalysisApiMode.Standalone -> + model("resolveCall") + } + } + } + component("compileTimeConstantProvider") { test(AbstractCompileTimeConstantEvaluatorTest::class) { model("evaluate")