Files
kotlin-fork/native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/output.txt
T
Sergej Jaskiewicz f26e470e80 [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
2024-02-12 11:22:46 +00:00

48 lines
4.3 KiB
Plaintext
Vendored

native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:4:5: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/A.foo|foo(){}[0]):
fun foo(): kotlin.String defined in com.example.klib.serialization.diagnostics.A
fun foo(): kotlin.Int defined in com.example.klib.serialization.diagnostics.A
@Deprecated("", level = DeprecationLevel.HIDDEN)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:7:5: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/A.foo|foo(){}[0]):
fun foo(): kotlin.String defined in com.example.klib.serialization.diagnostics.A
fun foo(): kotlin.Int defined in com.example.klib.serialization.diagnostics.A
fun foo(): Int = 0
^^^^^^^^^^^^^^^^^^
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:10:1: error: platform declaration clash: The following properties have the same IR signature (com.example.klib.serialization.diagnostics/myVal|{}myVal[0]):
val myVal: kotlin.String defined in com.example.klib.serialization.diagnostics
var myVal: kotlin.Int defined in com.example.klib.serialization.diagnostics
var myVal: kotlin.Long defined in com.example.klib.serialization.diagnostics
var myVal: Long = 0L
^^^^^^^^^^^^^^^^^^^^
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:10:1: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/myVal.<get-myVal>|<get-myVal>(){}[0]):
fun `<get-myVal>`(): kotlin.Int defined in com.example.klib.serialization.diagnostics
fun `<get-myVal>`(): kotlin.Long defined in com.example.klib.serialization.diagnostics
fun `<get-myVal>`(): kotlin.String defined in com.example.klib.serialization.diagnostics
var myVal: Long = 0L
^^^^^^^^^^^^^^^^^^^^
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:15:1: error: platform declaration clash: The following properties have the same IR signature (com.example.klib.serialization.diagnostics/myVal|{}myVal[0]):
val myVal: kotlin.String defined in com.example.klib.serialization.diagnostics
var myVal: kotlin.Int defined in com.example.klib.serialization.diagnostics
var myVal: kotlin.Long defined in com.example.klib.serialization.diagnostics
@Deprecated("", level = DeprecationLevel.HIDDEN)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:15:1: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/myVal.<get-myVal>|<get-myVal>(){}[0]):
fun `<get-myVal>`(): kotlin.Int defined in com.example.klib.serialization.diagnostics
fun `<get-myVal>`(): kotlin.Long defined in com.example.klib.serialization.diagnostics
fun `<get-myVal>`(): kotlin.String defined in com.example.klib.serialization.diagnostics
@Deprecated("", level = DeprecationLevel.HIDDEN)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:18:1: error: platform declaration clash: The following properties have the same IR signature (com.example.klib.serialization.diagnostics/myVal|{}myVal[0]):
val myVal: kotlin.String defined in com.example.klib.serialization.diagnostics
var myVal: kotlin.Int defined in com.example.klib.serialization.diagnostics
var myVal: kotlin.Long defined in com.example.klib.serialization.diagnostics
@Deprecated("", level = DeprecationLevel.HIDDEN)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:20:5: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/myVal.<get-myVal>|<get-myVal>(){}[0]):
fun `<get-myVal>`(): kotlin.Int defined in com.example.klib.serialization.diagnostics
fun `<get-myVal>`(): kotlin.Long defined in com.example.klib.serialization.diagnostics
fun `<get-myVal>`(): kotlin.String defined in com.example.klib.serialization.diagnostics
get() = ""
^^^^^^^^^^
COMPILATION_ERROR