Introduce "Add remaining when branches" intention #KT-23306 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
bde9a57c9e
commit
2c59f96ca4
+12
@@ -0,0 +1,12 @@
|
||||
enum class Entry {
|
||||
FOO, BAR, BAZ
|
||||
}
|
||||
|
||||
fun test(e: Entry): Int {
|
||||
return when (e) {
|
||||
<spot>Entry.FOO -> 1
|
||||
Entry.BAR -> TODO()
|
||||
Entry.BAZ -> TODO()
|
||||
else -> 0</spot>
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
enum class Entry {
|
||||
FOO, BAR, BAZ
|
||||
}
|
||||
|
||||
fun test(e: Entry): Int {
|
||||
return when (e) {
|
||||
<spot>Entry.FOO -> 1
|
||||
else -> 0</spot>
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention adds remaining branches on a <b>when</b> expression.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user