Add intention to expand boolean expression
#KT-38597 Fixed
This commit is contained in:
committed by
igoriakovlev
parent
f005091dfb
commit
343af60cb4
@@ -1642,6 +1642,11 @@
|
||||
<category>Kotlin</category>
|
||||
</intentionAction>
|
||||
|
||||
<intentionAction>
|
||||
<className>org.jetbrains.kotlin.idea.intentions.ExpandBooleanExpressionIntention</className>
|
||||
<category>Kotlin</category>
|
||||
</intentionAction>
|
||||
|
||||
<lang.inspectionSuppressor language="kotlin" implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinInspectionSuppressor"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.ObjectLiteralToLambdaInspection"
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun f(b: Boolean): Boolean {
|
||||
return if (b) {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun f(b: Boolean): Boolean {
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention replaces a <b>boolean</b> expression with the equivalent <b>if-else</b> expression.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user