[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:
committed by
Space Team
parent
f26e470e80
commit
5836067082
+4
-4
@@ -1,9 +1,9 @@
|
||||
Module: common
|
||||
/common.kt:7:1: error: Platform declaration clash: The following functions have the same IR signature (/foo|foo(){}[0]):
|
||||
/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:10:1: error: Platform declaration clash: The following functions have the same IR signature (/bar|bar(B){}[0]):
|
||||
/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
|
||||
|
||||
@@ -15,11 +15,11 @@ Module: common
|
||||
fun `<get-param>`(): kotlin.Int defined in root package
|
||||
fun `<get-param>`(): kotlin.Int defined in root package
|
||||
Module: platform
|
||||
/platform.kt:17:1: error: Platform declaration clash: The following functions have the same IR signature (/foo|foo(){}[0]):
|
||||
/platform.kt:18: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
|
||||
|
||||
/platform.kt:21:1: error: Platform declaration clash: The following functions have the same IR signature (/bar|bar(B){}[0]):
|
||||
/platform.kt:22: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
|
||||
|
||||
|
||||
@@ -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<!>
|
||||
|
||||
Reference in New Issue
Block a user