Files
kotlin-fork/compiler/testData/codegen/box/sealed/objects.kt
T
2018-06-09 19:15:38 +03:00

13 lines
235 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
sealed class Season {
object Warm: Season()
object Cold: Season()
}
fun foo(): Season = Season.Warm
fun box() = when(foo()) {
Season.Warm -> "OK"
Season.Cold -> "Fail: Cold, should be Warm"
}