Files
kotlin/compiler/testData/codegen/box/bridges/simpleGenericMethod.kt
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00

18 lines
329 B
Kotlin

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