Warning generation on non-exhaustive whens over enums + a set of tests + fixed test #KT-6227 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-05-28 15:28:13 +03:00
parent 969993bd09
commit de12771c0f
13 changed files with 318 additions and 5 deletions
@@ -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
}