[FIR] Properly reports about conflicts in MPP setup

Checker for conflicting declarations will now check for the following
  scenarios too
- two expect declarations in different modules
- actual and non-expect declarations in different modules

^KT-63826 Fixed
This commit is contained in:
Dmitriy Novozhilov
2024-02-27 14:04:42 +02:00
committed by Space Team
parent 2febc807a1
commit 6cfe81de50
11 changed files with 76 additions and 11 deletions
@@ -1,6 +1,6 @@
// MODULE: m1-common
// FILE: common.kt
expect fun <!EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE!>main<!>()
<!CONFLICTING_OVERLOADS!>expect fun main()<!>
// FILE: common2.kt
<!CONFLICTING_OVERLOADS!>actual fun <!ACTUAL_WITHOUT_EXPECT!>main<!>()<!> {}
@@ -0,0 +1,7 @@
// MODULE: common
// FILE: common.kt
expect class <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>Foo<!>
// MODULE: main()()(common)
// FILE: test.kt
expect class Foo
@@ -0,0 +1,7 @@
// MODULE: common
// FILE: common.kt
expect class <!NO_ACTUAL_FOR_EXPECT, NO_ACTUAL_FOR_EXPECT{JVM}, PACKAGE_OR_CLASSIFIER_REDECLARATION{JVM}!>Foo<!>
// MODULE: main()()(common)
// FILE: test.kt
expect class <!NO_ACTUAL_FOR_EXPECT, PACKAGE_OR_CLASSIFIER_REDECLARATION!>Foo<!>
@@ -0,0 +1,7 @@
// MODULE: common
// FILE: common.kt
expect class Foo
// MODULE: main()()(common)
// FILE: test.kt
expect class Foo