Files
kotlin-fork/js/js.translator/testFiles/native/cases/inheritanceFromNativeClass.kt
T

19 lines
331 B
Kotlin

package foo
native
open class A(b: Int) {
fun g(): Int = noImpl
fun m(): Int = noImpl
}
class B(val b: Int) : A(b / 2)
fun box(): String {
val b = B(10)
if (b !is A) return "b !is A"
if (b.g() != 10) return "b.g() != 10, it: ${b.g()}"
if (b.m() != 4) return "b.m() != 4, it: ${b.m()}"
return "OK"
}