diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/project/structure/LLFirBuiltinsSessionFactory.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/project/structure/LLFirBuiltinsSessionFactory.kt index 9c3ce77a922..71d6c48d080 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/project/structure/LLFirBuiltinsSessionFactory.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/project/structure/LLFirBuiltinsSessionFactory.kt @@ -77,9 +77,12 @@ class LLFirBuiltinsSessionFactory(private val project: Project) { register(FirLazyDeclarationResolver::class, FirDummyCompilerLazyDeclarationResolver) registerCommonComponents(LanguageVersionSettingsImpl.DEFAULT/*TODO*/) registerCommonComponentsAfterExtensionsAreConfigured() - registerJavaComponents(JavaModuleResolver.getInstance(project)) registerModuleData(moduleData) + if (platform.isJvm()) { + registerJavaComponents(JavaModuleResolver.getInstance(project)) + } + val kotlinScopeProvider = FirKotlinScopeProvider(::wrapScopeWithJvmMapped) register(FirKotlinScopeProvider::class, kotlinScopeProvider) diff --git a/compiler/testData/diagnostics/tests/multimodule/expectActualAnnotationsWithLazyResolve.ll.kt b/compiler/testData/diagnostics/tests/multimodule/expectActualAnnotationsWithLazyResolve.ll.kt deleted file mode 100644 index 1d70085ee82..00000000000 --- a/compiler/testData/diagnostics/tests/multimodule/expectActualAnnotationsWithLazyResolve.ll.kt +++ /dev/null @@ -1,41 +0,0 @@ -// LL_FIR_DIVERGENCE -// Difference to FIR is false-positive report of MISSING_DEPENDENCY_SUPERCLASS. -// This is because JVM Enum with `java.io.Serializable` superclass resolved instead of common builtin Enum. -// Must be fixed with KT-61757. -// LL_FIR_DIVERGENCE - -// Test for ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT diagnostic when annotations arguments are lazily resolved. - -// LANGUAGE: +MultiPlatformProjects -// MODULE: common -// TARGET_PLATFORM: Common -@Target(AnnotationTarget.TYPE, AnnotationTarget.FUNCTION) -annotation class Ann(val s: String = "default") - -expect fun onType_negative(): @Ann("") Any -expect fun onType_positive(): @Ann("") Any - -@Ann("") -expect fun onFunction_negative() -@Ann("") -expect fun onFunction_positive() - -@Ann -expect fun withEmptyArguments_negative() -@Ann -expect fun withEmptyArguments_positive() - -// MODULE: main()()(common) -// TARGET_PLATFORM: JVM -actual fun onType_negative(): @Ann("") Any = Any() -actual fun onType_positive(): @Ann("incorrect") Any = Any() - -@Ann("") -actual fun onFunction_negative() {} -@Ann("incorrect") -actual fun onFunction_positive() {} - -@Ann -actual fun withEmptyArguments_negative() {} -@Ann("incorrect") -actual fun withEmptyArguments_positive() {}