[klib] Don't show signature clash diagnostics for local declarations

For some reason type parameters end up in
`GlobdalDeclarationTable`, and thus we tracked them in
`IdSignatureClashDetector`, which wasn't right and confused the
diagnostic renderer that uses
`org.jetbrains.kotlin.resolve.MemberComparator` for sorting the
declarations to display in diagnostics. That comparator doesn't know
jow to work with type parameters.

Besides, type parameters, like many other types of declarations, are not
considered public wrt KLIB ABI, so there's no need to show
CONFLICTING_KLIB_SIGNATURES_ERROR for them.

^KT-65723 Fixed
This commit is contained in:
Sergej Jaskiewicz
2024-02-09 19:26:27 +01:00
committed by Space Team
parent e363a1228d
commit f26e470e80
6 changed files with 50 additions and 43 deletions
@@ -10,7 +10,7 @@ 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, CONFLICTING_KLIB_SIGNATURES_ERROR!>val param = 0<!>
<!CONFLICTING_KLIB_SIGNATURES_ERROR, CONFLICTING_KLIB_SIGNATURES_ERROR!>val param = 0<!>
// MODULE: platform()()(common)
// FILE: platform.kt
@@ -21,4 +21,4 @@ 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, CONFLICTING_KLIB_SIGNATURES_ERROR!>val param = 0<!>
<!CONFLICTING_KLIB_SIGNATURES_ERROR, CONFLICTING_KLIB_SIGNATURES_ERROR!>val param = 0<!>