Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt398.kt
T
2015-03-18 16:06:44 +03:00

11 lines
283 B
Kotlin
Vendored

// KT-398 Internal error when property initializes with function
class X<T>() {
val check = { a : Any -> a is <!CANNOT_CHECK_FOR_ERASED!>T<!> }
}
fun box() : String {
if(X<String>().check(10)) return "fail"
if(!X<String>().check("lala")) return "fail"
return "OK"
}