Warning generation on non-exhaustive whens over enums + a set of tests + fixed test #KT-6227 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Base for KT-6227
|
||||
enum class X { A, B, C, D }
|
||||
|
||||
fun foo(arg: X): String {
|
||||
val res: String
|
||||
when (arg) {
|
||||
X.A -> res = "A"
|
||||
X.B -> res = "B"
|
||||
else -> res = "CD"
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user