Files
kotlin-fork/backend.native/tests/external/codegen/blackbox/bridges/simple.kt
T
Ilya Matveev 1b553ebfaf backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests
in other directories and they are to be added.
2017-01-20 14:04:04 +03:00

19 lines
300 B
Kotlin

open class A<T> {
open fun foo(t: T) = "A"
}
class Z : A<String>() {
override fun foo(t: String) = "Z"
}
fun box(): String {
val z = Z()
val a: A<String> = z
return when {
z.foo("") != "Z" -> "Fail #1"
a.foo("") != "Z" -> "Fail #2"
else -> "OK"
}
}