Files
kotlin-fork/idea/testData/quickfix/when/addRemainingBranchesSealedStatement.kt
T
fitermay e30b9758f4 Introduce action to add missing when branches on sealed class
Made via diagnostics NON_EXHAUSTIVE_WHEN_FOR_SEALED_CLASS
with INFO severity and quick-fix
So #KT-17580 Fixed
2017-05-16 16:43:27 +03:00

17 lines
367 B
Kotlin
Vendored

// "Add remaining branches" "true"
// ERROR: Unresolved reference: TODO
// ERROR: Unresolved reference: TODO
// ERROR: Unresolved reference: TODO
sealed class Variant {
object Singleton : Variant()
class Something(val x: Int) : Variant()
object Another : Variant()
}
fun test(v: Variant?) {
wh<caret>en(v) {
Variant.Singleton -> "s"
}
}