Files
kotlin-fork/kotlin-native/backend.native/tests/objcexport/kt46431.kt
T
Svyatoslav Scherbina 5d5628f56e Native: apply ObjCExport virtual adapters from interfaces of supers
Previously they were skipped, and this was an incorrect optimization:
even if super class implements the interface too, this doesn't mean
that virtual adapters provided by that interface are inherited
by non-exported subclass that needs them;
for example, this doesn't happen when the super class is exported
(i.e. Obj-C class is not created at runtime).

Remove incorrect optimization instead of making it more sophisticated,
because it is useless anyway.

^KT-46431 Fixed
2021-06-22 09:29:29 +00:00

21 lines
443 B
Kotlin

/*
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package kt43599
// Based on https://youtrack.jetbrains.com/issue/KT-46431
interface Host {
val test: String
}
abstract class AbstractHost : Host
fun createAbstractHost(): Host {
return object : AbstractHost() {
override val test: String
get() = "1234"
}
}