[FIR] Report redeclaration across KMP source sets

^KT-57585 Fixed

Related tests:
- MultiPlatformIntegrationTestGenerated.testSimpleNoImplKeywordOnTopLevelFunction
- MultiPlatformIntegrationTestGenerated.testWeakIncompatibilityWithoutActualModifier
- FirPsiJsKlibDiagnosticsTestGenerated.testSignatureClash_MPP
- LLFirPreresolvedReversedDiagnosticCompilerFirTestDataTestGenerated$ResolveWithStdlib$MultiModule.testFakeOverrides
- DiagnosticCompilerTestFE10TestdataTestGenerated$Tests$Multiplatform:
- LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated$Tests$Multiplatform
- FirOldFrontendMPPDiagnosticsWithPsiTestGenerated
- FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated
- FirLibraryModuleDeclarationResolveTestGenerated.testDataClass
- org.jetbrains.kotlin.idea.k2.highlighting.K2HighlightingMetaInfoTestGenerated$Diagnostics.testDataClassFromLibrary
- org.jetbrains.fir.uast.test.FirLightClassBehaviorTest.testContainingFile
- org.jetbrains.fir.uast.test.FirLightClassBehaviorTest.testAnnotationParameterReference
- org.jetbrains.uast.test.kotlin.org.jetbrains.uast.test.kotlin.comparison.FE1LightClassBehaviorTest.testContainingFile
This commit is contained in:
Nikita Bobko
2024-02-05 16:47:22 +01:00
committed by teamcity
parent 4120d6a8aa
commit 7924573d20
21 changed files with 289 additions and 9 deletions
@@ -1,8 +1,14 @@
Module: common
/common.kt:8:1: error: Conflicting overloads:
fun foo(): Int
/common.kt:8:1: error: Platform declaration clash: The following functions have the same IR signature (/foo|foo(){}[0]):
fun foo(): kotlin.Int defined in root package
fun foo(): kotlin.String defined in root package
/common.kt:11:1: error: Conflicting overloads:
fun bar(x: B): Int
/common.kt:11:1: error: Platform declaration clash: The following functions have the same IR signature (/bar|bar(B){}[0]):
fun bar(x: B): kotlin.Int defined in root package
fun bar(x: B): kotlin.Int defined in root package
@@ -5,10 +5,10 @@
// MODULE: common
// FILE: common.kt
<!CONFLICTING_KLIB_SIGNATURES_ERROR!>fun foo(): String = ""<!>
<!CONFLICTING_KLIB_SIGNATURES_ERROR!><!CONFLICTING_OVERLOADS!>fun foo(): String<!> = ""<!>
expect class A
<!CONFLICTING_KLIB_SIGNATURES_ERROR!>fun bar(x: A): Int = 2<!>
<!CONFLICTING_KLIB_SIGNATURES_ERROR!><!CONFLICTING_OVERLOADS!>fun bar(x: A): Int<!> = 2<!>
<!CONFLICTING_KLIB_SIGNATURES_ERROR, CONFLICTING_KLIB_SIGNATURES_ERROR!>@Suppress("REDECLARATION")
val param = 0<!>