Files
kotlin-fork/compiler/testData/diagnostics/nativeTests/objCName4.kt
T
Anastasia.Nekrasova 434470a4f5 [K/N][K2]: K2 behavioral difference with inconsistent inheritance of ObjCName
The problem arises when retrieveDirectOverriddenOf returns a
substitution override member. For such members, it is impossible to get
the first base member. For a correct result, it is required to find
originalForSubstitutionOverride for all substitutionOverrides.

#KT-64276 Fixed
2024-02-02 13:54:45 +00:00

31 lines
620 B
Kotlin
Vendored

// FIR_IDENTICAL
// FILE: kotlin.kt
@file:OptIn(ExperimentalObjCName::class)
package kotlin.native
import kotlin.experimental.ExperimentalObjCName
fun interface BaseInterface {
@ObjCName("close")
fun close()
}
interface DerivedInterface : BaseInterface {
override fun close()
}
fun interface IntersectionInterface {
@ObjCName("close")
fun close()
}
open class IntersectionAbstract<T> {
@ObjCName("close")
fun close() {
}
}
open class IntersectionBaseClass<T> : IntersectionAbstract<T>(), IntersectionInterface
class DerivedClass : IntersectionBaseClass<Any>(), DerivedInterface {}