[klib] Add error suppression to a signature clash diagnostic test

Currently, REDECLARATION is not reported if two conflicting declarations
are in different source sets (KT-59898). However, when it's fixed,
we want this test to keep testing the signature clash diagnostic,
and not fail because of unexpected REDECLARATION error.
This commit is contained in:
Sergej Jaskiewicz
2024-02-09 19:44:07 +01:00
committed by Space Team
parent f26e470e80
commit 5836067082
2 changed files with 9 additions and 8 deletions
@@ -1,4 +1,5 @@
// LANGUAGE: +MultiPlatformProjects
// DIAGNOSTICS: -ERROR_SUPPRESSION
// FIR_IDENTICAL
// RENDER_ALL_DIAGNOSTICS_FULL_TEXT
@@ -9,8 +10,8 @@
expect class A
<!CONFLICTING_KLIB_SIGNATURES_ERROR!>fun bar(x: A): Int = 2<!>
// NOTE: This must be REDECLARATION, see KT-59898
<!CONFLICTING_KLIB_SIGNATURES_ERROR, CONFLICTING_KLIB_SIGNATURES_ERROR!>val param = 0<!>
<!CONFLICTING_KLIB_SIGNATURES_ERROR, CONFLICTING_KLIB_SIGNATURES_ERROR!>@Suppress("REDECLARATION")
val param = 0<!>
// MODULE: platform()()(common)
// FILE: platform.kt
@@ -20,5 +21,5 @@ class B
actual typealias A = B
<!CONFLICTING_KLIB_SIGNATURES_ERROR!>fun bar(x: B): Int = 3<!>
// NOTE: This must be REDECLARATION, see KT-59898
<!CONFLICTING_KLIB_SIGNATURES_ERROR, CONFLICTING_KLIB_SIGNATURES_ERROR!>val param = 0<!>
<!CONFLICTING_KLIB_SIGNATURES_ERROR, CONFLICTING_KLIB_SIGNATURES_ERROR!>@Suppress("REDECLARATION")
val param = 0<!>