[klib] Add a test ensuring that signature clash detection works w/ MPP

This commit is contained in:
Sergej Jaskiewicz
2024-01-23 20:41:18 +01:00
committed by Space Team
parent 03aa14b473
commit f84fa29fef
3 changed files with 40 additions and 0 deletions
@@ -0,0 +1,18 @@
// LANGUAGE: +MultiPlatformProjects
// FIR_IDENTICAL
// RENDER_ALL_DIAGNOSTICS_FULL_TEXT
// MODULE: common
// FILE: common.kt
<!CONFLICTING_KLIB_SIGNATURES_ERROR!>fun foo(): String = ""<!>
expect class A
<!CONFLICTING_KLIB_SIGNATURES_ERROR!>fun bar(x: A): Int = 2<!>
// MODULE: platform()()(common)
// FILE: platform.kt
<!CONFLICTING_KLIB_SIGNATURES_ERROR!>fun foo(): Int = 0<!>
class B
actual typealias A = B
<!CONFLICTING_KLIB_SIGNATURES_ERROR!>fun bar(x: B): Int = 3<!>