5afab1ac2b
parameters with bounds/supertypes.
5 lines
172 B
Kotlin
Vendored
5 lines
172 B
Kotlin
Vendored
fun box() =
|
|
if (getAndCheck({ 42 }, { 42 })) "OK" else "fail"
|
|
|
|
inline fun <T> getAndCheck(getFirst: () -> T, getSecond: () -> T) =
|
|
getFirst() == getSecond() |