Sealed code generation: sealed is considered abstract, correct serialization
A pair of tests provided.
This commit is contained in:
+11
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user