From c1f6fe1e76f8b3c5c775583dcf3dd14bc33c921f Mon Sep 17 00:00:00 2001 From: Brian Norman Date: Thu, 26 Oct 2023 11:32:26 -0500 Subject: [PATCH] [FIR] Do not include transitive friend dependencies in symbol provider When flattening a dependency FirSymbolProvider, make sure transitive dependency FirSymbolProviders are not included. This requires checking that nested symbol provider sessions match the composite symbol provider session when they are both source sessions. ^KT-60614 Fixed --- ...CompilerTestFE10TestdataTestGenerated.java | 6 ++ ...sticCompilerFE10TestDataTestGenerated.java | 6 ++ ...eeOldFrontendDiagnosticsTestGenerated.java | 6 ++ ...siOldFrontendDiagnosticsTestGenerated.java | 6 ++ .../fir/session/FirAbstractSessionFactory.kt | 23 +++-- .../FirLightTreeJvmIrTextTestGenerated.java | 6 -- .../ir/FirPsiJvmIrTextTestGenerated.java | 6 -- .../box/typealias}/kt45308.ir.txt | 2 +- .../testData/codegen/box/typealias/kt45308.kt | 2 + .../tests/multimodule/dependencyModule.fir.kt | 83 +++++++++++++++++++ .../tests/multimodule/dependencyModule.kt | 83 +++++++++++++++++++ .../tests/multimodule/friendModule.fir.kt | 53 ++++++++++++ .../tests/multimodule/friendModule.kt | 18 +++- .../tests/multimodule/friendModule.txt | 5 ++ .../ir/irText/declarations/kt45308.kt | 24 ------ .../ir/irText/declarations/kt45308.sig.kt.txt | 35 -------- .../test/runners/DiagnosticTestGenerated.java | 6 ++ .../ir/ClassicJvmIrTextTestGenerated.java | 6 -- .../klib/KlibIrTextTestCaseGenerated.java | 5 -- .../FirLightTreeJsIrTextTestGenerated.java | 6 -- .../test/fir/FirPsiJsIrTextTestGenerated.java | 6 -- .../test/ir/ClassicJsIrTextTestGenerated.java | 6 -- .../ClassicNativeIrTextTestGenerated.java | 6 -- ...FirLightTreeNativeIrTextTestGenerated.java | 6 -- .../FirPsiNativeIrTextTestGenerated.java | 6 -- 25 files changed, 285 insertions(+), 132 deletions(-) rename compiler/testData/{ir/irText/declarations => codegen/box/typealias}/kt45308.ir.txt (99%) create mode 100644 compiler/testData/diagnostics/tests/multimodule/dependencyModule.fir.kt create mode 100644 compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt create mode 100644 compiler/testData/diagnostics/tests/multimodule/friendModule.fir.kt delete mode 100644 compiler/testData/ir/irText/declarations/kt45308.kt delete mode 100644 compiler/testData/ir/irText/declarations/kt45308.sig.kt.txt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java index 9e969631b9e..1515fc629d6 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java @@ -23266,6 +23266,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true); } + @Test + @TestMetadata("dependencyModule.kt") + public void testDependencyModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt"); + } + @Test @TestMetadata("dependsOnModule.kt") public void testDependsOnModule() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java index dd916e908f0..344708f2ef3 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java @@ -23266,6 +23266,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true); } + @Test + @TestMetadata("dependencyModule.kt") + public void testDependencyModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt"); + } + @Test @TestMetadata("dependsOnModule.kt") public void testDependsOnModule() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java index 390c6eb5e33..b6b18f390a7 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java @@ -23260,6 +23260,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform"); } + @Test + @TestMetadata("dependencyModule.kt") + public void testDependencyModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt"); + } + @Test @TestMetadata("dependsOnModule.kt") public void testDependsOnModule() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java index 9843297a091..f5546886379 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java @@ -23266,6 +23266,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform"); } + @Test + @TestMetadata("dependencyModule.kt") + public void testDependencyModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt"); + } + @Test @TestMetadata("dependsOnModule.kt") public void testDependsOnModule() throws Exception { diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirAbstractSessionFactory.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirAbstractSessionFactory.kt index a13f25b1350..9e554e7c6ef 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirAbstractSessionFactory.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirAbstractSessionFactory.kt @@ -6,7 +6,6 @@ package org.jetbrains.kotlin.fir.session import org.jetbrains.kotlin.config.LanguageVersionSettings -import org.jetbrains.kotlin.container.topologicalSort import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.checkers.registerCommonCheckers import org.jetbrains.kotlin.fir.deserialization.ModuleDataProvider @@ -146,37 +145,37 @@ abstract class FirAbstractSessionFactory { } private fun FirSession.computeDependencyProviderList(moduleData: FirModuleData): List { - val visited = mutableSetOf() - // dependsOnDependencies can actualize declarations from their dependencies. Because actual declarations can be more specific // (e.g. have additional supertypes), the modules must be ordered from most specific (i.e. actual) to most generic (i.e. expect) // to prevent false positive resolution errors (see KT-57369 for an example). return (moduleData.dependencies + moduleData.friendDependencies + moduleData.allDependsOnDependencies) .mapNotNull { sessionProvider?.getSession(it) } - .map { it.symbolProvider } - .flatMap { it.flatten(visited, collectSourceProviders = it.session.kind == FirSession.Kind.Source) } + .flatMap { it.symbolProvider.flatten() } + .distinct() .sortedBy { it.session.kind } } /* It eliminates dependency and composite providers since the current dependency provider is composite in fact. * To prevent duplications and resolving errors, library or source providers from other modules should be filtered out during flattening. * It depends on the session's kind of the top-level provider */ - private fun FirSymbolProvider.flatten( - visited: MutableSet, - collectSourceProviders: Boolean - ): List { + private fun FirSymbolProvider.flatten(): List { + val originalSession = session.takeIf { it.kind == FirSession.Kind.Source } val result = mutableListOf() fun FirSymbolProvider.collectProviders() { - if (!visited.add(this)) return when { + // When provider is composite, unwrap all contained providers and recurse. this is FirCachingCompositeSymbolProvider -> { for (provider in providers) { provider.collectProviders() } } - collectSourceProviders && session.kind == FirSession.Kind.Source || - !collectSourceProviders && session.kind == FirSession.Kind.Library -> { + + // Make sure only source symbol providers from the same session as the original symbol provider are flattened. A composite + // symbol provider can contain source symbol providers from multiple sessions that may represent dependency symbol providers + // which should not be propagated transitively. + originalSession != null && session.kind == FirSession.Kind.Source && session == originalSession || + originalSession == null && session.kind == FirSession.Kind.Library -> { result.add(this) } } diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java index d5160afa448..7cdf199fc7e 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java @@ -504,12 +504,6 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java index 23585fa801d..d793705522d 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java @@ -504,12 +504,6 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { diff --git a/compiler/testData/ir/irText/declarations/kt45308.ir.txt b/compiler/testData/codegen/box/typealias/kt45308.ir.txt similarity index 99% rename from compiler/testData/ir/irText/declarations/kt45308.ir.txt rename to compiler/testData/codegen/box/typealias/kt45308.ir.txt index 13c2975cf08..8272410bdec 100644 --- a/compiler/testData/ir/irText/declarations/kt45308.ir.txt +++ b/compiler/testData/codegen/box/typealias/kt45308.ir.txt @@ -9,7 +9,7 @@ FILE fqName:b fileName:/b.kt RETURN type=kotlin.Nothing from='public final fun foo (f: kotlin.Function0): kotlin.String declared in b' CALL 'public abstract fun invoke (): R of kotlin.Function0 declared in kotlin.Function0' type=kotlin.String origin=INVOKE $this: GET_VAR 'f: kotlin.Function0 declared in b.foo' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION -Module: c +Module: main FILE fqName: fileName:/c.kt FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY diff --git a/compiler/testData/codegen/box/typealias/kt45308.kt b/compiler/testData/codegen/box/typealias/kt45308.kt index 1cc1ff0ed43..3e5eb91d9a1 100644 --- a/compiler/testData/codegen/box/typealias/kt45308.kt +++ b/compiler/testData/codegen/box/typealias/kt45308.kt @@ -1,3 +1,5 @@ +// FIR_IDENTICAL +// DUMP_IR // This test checks that unresolved typealias in an abbreviated type does not crash the compiler or result in a compilation error. // Apparently, there's some demand for this behavior, see KT-45308, KT-58335. diff --git a/compiler/testData/diagnostics/tests/multimodule/dependencyModule.fir.kt b/compiler/testData/diagnostics/tests/multimodule/dependencyModule.fir.kt new file mode 100644 index 00000000000..ac6c3f88371 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multimodule/dependencyModule.fir.kt @@ -0,0 +1,83 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE +// MODULE: m1 +// FILE: a.kt + +package p + +public class A { + public val propPublic = A() + internal val propInternal = A() + private val propPrivate = A() + public fun funPublic() = A() + internal fun funInternal() = A() + private fun funPrivate() = A() + public inner class ClassPublic + internal inner class ClassInternal + private inner class ClassPrivate +} + +public val propPublic = A() +internal val propInternal = A() +private val propPrivate = A() +public fun funPublic() = A() +internal fun funInternal() = A() +private fun funPrivate() = A() +public class ClassPublic +internal class ClassInternal +private class ClassPrivate + +// MODULE: m2(m1) +// FILE: b.kt + +import p.* + +fun test2() { + propPublic + propInternal + propPrivate + funPublic() + funInternal() + funPrivate() + ClassPublic() + ClassInternal() + ClassPrivate() + + val inst = A() + inst.propPublic + inst.propInternal + inst.propPrivate + inst.funPublic() + inst.funInternal() + inst.funPrivate() + inst.ClassPublic() + inst.ClassInternal() + inst.ClassPrivate() +} + +// MODULE: m3(m2) +// FILE: c.kt + +import p.* + +fun test3() { + propPublic + propInternal + propPrivate + funPublic() + funInternal() + funPrivate() + ClassPublic() + ClassInternal() + ClassPrivate() + + val inst = A() + inst.propPublic + inst.propInternal + inst.propPrivate + inst.funPublic() + inst.funInternal() + inst.funPrivate() + inst.ClassPublic() + inst.ClassInternal() + inst.ClassPrivate() +} diff --git a/compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt b/compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt new file mode 100644 index 00000000000..ad2defd8514 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt @@ -0,0 +1,83 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE +// MODULE: m1 +// FILE: a.kt + +package p + +public class A { + public val propPublic = A() + internal val propInternal = A() + private val propPrivate = A() + public fun funPublic() = A() + internal fun funInternal() = A() + private fun funPrivate() = A() + public inner class ClassPublic + internal inner class ClassInternal + private inner class ClassPrivate +} + +public val propPublic = A() +internal val propInternal = A() +private val propPrivate = A() +public fun funPublic() = A() +internal fun funInternal() = A() +private fun funPrivate() = A() +public class ClassPublic +internal class ClassInternal +private class ClassPrivate + +// MODULE: m2(m1) +// FILE: b.kt + +import p.* + +fun test2() { + propPublic + propInternal + propPrivate + funPublic() + funInternal() + funPrivate() + ClassPublic() + ClassInternal() + ClassPrivate() + + val inst = A() + inst.propPublic + inst.propInternal + inst.propPrivate + inst.funPublic() + inst.funInternal() + inst.funPrivate() + inst.ClassPublic() + inst.ClassInternal() + inst.ClassPrivate() +} + +// MODULE: m3(m2) +// FILE: c.kt + +import p.* + +fun test3() { + propPublic + propInternal + propPrivate + funPublic() + funInternal() + funPrivate() + ClassPublic() + ClassInternal() + ClassPrivate() + + val inst = A() + inst.propPublic + inst.propInternal + inst.propPrivate + inst.funPublic() + inst.funInternal() + inst.funPrivate() + inst.ClassPublic() + inst.ClassInternal() + inst.ClassPrivate() +} diff --git a/compiler/testData/diagnostics/tests/multimodule/friendModule.fir.kt b/compiler/testData/diagnostics/tests/multimodule/friendModule.fir.kt new file mode 100644 index 00000000000..fdb91d0e55a --- /dev/null +++ b/compiler/testData/diagnostics/tests/multimodule/friendModule.fir.kt @@ -0,0 +1,53 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE +// MODULE: m1 +// FILE: a.kt + +package p + +public class A { + internal val a = A() + internal var v = A() + internal fun a() = A() + internal inner class B +} + +internal val a = A() +internal var v = A() +internal fun a() = A() +internal class B + +// MODULE: m2()(m1) +// FILE: b.kt + +import p.* + +fun test() { + val _a = a + val _v = v + a() + B() + + val inst = A() + val ia = inst.a + val iv = inst.v + inst.a() + inst.B() +} + +// MODULE: m3()(m2) +// FILE: c.kt + +import p.* + +fun test3() { + val _a = a + val _v = v + a() + B() + + val inst = A() + val ia = inst.a + val iv = inst.v + inst.a() + inst.B() +} diff --git a/compiler/testData/diagnostics/tests/multimodule/friendModule.kt b/compiler/testData/diagnostics/tests/multimodule/friendModule.kt index 9bbcb36dcd2..1e9e3446b18 100644 --- a/compiler/testData/diagnostics/tests/multimodule/friendModule.kt +++ b/compiler/testData/diagnostics/tests/multimodule/friendModule.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_VARIABLE // MODULE: m1 // FILE: a.kt @@ -35,3 +34,20 @@ fun test() { inst.B() } +// MODULE: m3()(m2) +// FILE: c.kt + +import p.* + +fun test3() { + val _a = a + val _v = v + a() + B() + + val inst = A() + val ia = inst.a + val iv = inst.v + inst.a() + inst.B() +} diff --git a/compiler/testData/diagnostics/tests/multimodule/friendModule.txt b/compiler/testData/diagnostics/tests/multimodule/friendModule.txt index 0a06ca0bc8f..b1fffd47447 100644 --- a/compiler/testData/diagnostics/tests/multimodule/friendModule.txt +++ b/compiler/testData/diagnostics/tests/multimodule/friendModule.txt @@ -35,3 +35,8 @@ package p { package public fun test(): kotlin.Unit + +// -- Module: -- +package + +public fun test3(): kotlin.Unit diff --git a/compiler/testData/ir/irText/declarations/kt45308.kt b/compiler/testData/ir/irText/declarations/kt45308.kt deleted file mode 100644 index 5daa2d4e27d..00000000000 --- a/compiler/testData/ir/irText/declarations/kt45308.kt +++ /dev/null @@ -1,24 +0,0 @@ -// FIR_IDENTICAL -// SKIP_KT_DUMP -// IGNORE_BACKEND_K1: JS_IR -// IGNORE_BACKEND_K1: JS_IR_ES6 - -// MODULE: a -// FILE: a.kt -package a - -typealias A = String - -// MODULE: b(a) -// FILE: b.kt -package b - -import a.A - -fun foo(f: () -> A): A = f() - -// MODULE: c(b) -// FILE: c.kt -import b.foo - -fun box(): String = foo { "OK" } diff --git a/compiler/testData/ir/irText/declarations/kt45308.sig.kt.txt b/compiler/testData/ir/irText/declarations/kt45308.sig.kt.txt deleted file mode 100644 index 762460d9aac..00000000000 --- a/compiler/testData/ir/irText/declarations/kt45308.sig.kt.txt +++ /dev/null @@ -1,35 +0,0 @@ -// MODULE: a -// FILE: a.kt -package a - -// CHECK: -// Mangled name: a.A -// Public signature: a/A|null[0] -typealias A = String -// MODULE: b -// FILE: b.kt -package b - -// CHECK JVM_IR: -// Mangled name: b#foo(kotlin.Function0){}kotlin.String -// Public signature: b/foo|-5020381652845254261[0] -// Public signature debug description: foo(kotlin.Function0){}kotlin.String -// CHECK JS_IR NATIVE: -// Mangled name: b#foo(kotlin.Function0){} -// Public signature: b/foo|-2695324588787180624[0] -// Public signature debug description: foo(kotlin.Function0){} -fun foo(f: Function0): String - -// MODULE: c -// FILE: c.kt - -// CHECK JVM_IR: -// Mangled name: #box(){}kotlin.String -// Public signature: /box|-9347091776561469[0] -// Public signature debug description: box(){}kotlin.String -// CHECK JS_IR NATIVE: -// Mangled name: #box(){} -// Public signature: /box|2173511048851971368[0] -// Public signature debug description: box(){} -fun box(): String - diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 2845ffc86eb..6140fef6d82 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -23266,6 +23266,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true); } + @Test + @TestMetadata("dependencyModule.kt") + public void testDependencyModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/multimodule/dependencyModule.kt"); + } + @Test @TestMetadata("dependsOnModule.kt") public void testDependsOnModule() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java index 5e82e4b7004..9c0ee308dd0 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java @@ -504,12 +504,6 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java index a9a2d10b84e..bb37413e952 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java @@ -388,11 +388,6 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { runTest("compiler/testData/ir/irText/declarations/kt47527.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java index 17d75268422..949bc94673e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java @@ -438,12 +438,6 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java index e8a6ee6b4b7..114c201b0c2 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java @@ -438,12 +438,6 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java index 59001acaab7..a9477b3ca8e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java @@ -438,12 +438,6 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java index 14c16cee3a1..554f4b1366c 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java @@ -438,12 +438,6 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java index 019da2fc9e7..546e0577635 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java @@ -438,12 +438,6 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java index d757f44c61f..479f409ffbe 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java @@ -438,12 +438,6 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } - @Test - @TestMetadata("kt45308.kt") - public void testKt45308() throws Exception { - runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); - } - @Test @TestMetadata("kt47527.kt") public void testKt47527() throws Exception {