Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt
T
Alexander Udalov ae401cac0f Prohibit type parameters for enum classes
#KT-5696 Fixed
2014-10-21 00:16:07 +04:00

12 lines
249 B
Kotlin

class List<out T>(val size : Int) {
class object {
val Nil = List<Nothing>(0)
}
}
fun List<String>.join() =
when (this) {
List.Nil -> "[]" // CANNOT_CHECK_FOR_ERASED was reported
else -> ""
}