Files
Mikhail Glukhikh 7615d863d5 K2: add ACCIDENTAL_OVERRIDE_CLASH_BY_JVM_SIGNATURE for clashing functions
This diagnostic is reported on an explicitly-declared function which
overrides a regular Java function with the same signature as a hidden
one from the same scope.

#KT-64846 Fixed
2024-01-31 17:06:36 +00:00

11 lines
917 B
Plaintext
Vendored

/main.kt:(70,78): error: This function accidentally overrides both 'public open operator fun /A.contains(x: kotlin/String!): kotlin/Boolean' and a function with erased parameters 'public open operator fun /A.contains(x: kotlin/Any!): kotlin/Boolean' from JVM point of view because of mixed Java/Kotlin hierarchy.
This situation provokes a JVM clash and thus is forbidden. To fix it, you have to delete either this function or one of overridden functions.
/main.kt:(159,160): error: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.String!' was expected.
/main.kt:(178,179): error: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.String!' was expected.
/main.kt:(222,223): error: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.String' was expected.
/main.kt:(242,243): error: Argument type mismatch: actual type is 'kotlin.Int', but 'kotlin.String' was expected.