-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace 'when' with 'if': do not suggest if 'when' is used as express…
…ion and it has no 'else' branch #KT-35329 Fixed
- Loading branch information
1 parent
893021f
commit 77b6881
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
idea/testData/intentions/branched/ifWhen/whenToIf/whenWithoutElseUsedAsExpression.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//IS_APPLICABLE: false | ||
enum class E { X, Y, Z} | ||
|
||
fun test(e: E) { | ||
val i = <caret>when (e) { | ||
E.X -> 1 | ||
E.Y -> 2 | ||
E.Z -> 3 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.