5afab1ac2b
parameters with bounds/supertypes.
9 lines
112 B
Kotlin
Vendored
9 lines
112 B
Kotlin
Vendored
fun <T: Number?> foo(t: T) {
|
|
(t ?: 42).toInt()
|
|
}
|
|
|
|
fun box(): String {
|
|
foo<Int?>(null)
|
|
return "OK"
|
|
}
|