Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt313.kt
T
2013-12-11 19:53:50 +04:00

12 lines
295 B
Kotlin

// KT-313 Bug in substitutions in a function returning its type parameter T
fun <T> Iterable<T>.join(separator : String?) : String {
return separator.npe()
}
fun <T : Any> T?.npe() : T {
if (this == null)
throw NullPointerException()
return <!DEBUG_INFO_AUTOCAST!>this<!>;
}