Sealed code generation: sealed is considered abstract, correct serialization

A pair of tests provided.
This commit is contained in:
Mikhail Glukhikh
2015-06-17 18:17:30 +03:00
parent 4d2ba3e890
commit 6e2395471d
10 changed files with 72 additions and 6 deletions
+11
View File
@@ -0,0 +1,11 @@
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"
}