Files
kotlin-fork/compiler/testData/diagnostics/nativeTests/objCNameWithTwoModules.kt
T
Anastasia.Nekrasova bb8c7dd04c [K/N][K2] K2 behavioral difference with inconsistent inheritance of ObjCName
When a declaration with an ObjC annotation is stored in a different
module, the annotation arguments are not resolved by default. This leads
to a bug in the checker. Before attempting to find the objCName, it is
necessary to resolve the annotation first.

#KT-64276
2024-02-19 09:29:43 +00:00

38 lines
690 B
Kotlin
Vendored

// FIR_IDENTICAL
// MODULE: lib
// FILE: kotlin1.kt
@file:OptIn(ExperimentalObjCName::class)
package example
import kotlin.experimental.ExperimentalObjCName
interface BaseInterface {
@kotlin.native.ObjCName("getValue")
fun getValue(): Int
}
// MODULE: main(lib)
// FILE: kotlin2.kt
@file:OptIn(ExperimentalObjCName::class)
package example
import kotlin.experimental.ExperimentalObjCName
open class BaseClass {
@kotlin.native.ObjCName("getValue")
fun getValue(): Int {
return 0
}
}
// FILE: kotlin3.kt
@file:OptIn(ExperimentalObjCName::class)
package example
import kotlin.experimental.ExperimentalObjCName
class Derived: BaseClass(), BaseInterface {}