Fixed EA-57220.
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace 'if' expression with elvis expression" "true"
|
||||
|
||||
data class IntPair(val first: Int?, val second: Int?)
|
||||
|
||||
fun f(pair: IntPair): Int {
|
||||
val (x, y) = pair
|
||||
return if (x != <caret>null) x else 5
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace 'if' expression with elvis expression" "true"
|
||||
|
||||
data class IntPair(val first: Int?, val second: Int?)
|
||||
|
||||
fun f(pair: IntPair): Int {
|
||||
val (x, y) = pair
|
||||
return x ?: 5
|
||||
}
|
||||
@@ -79,6 +79,14 @@
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">If-Then foldable to '?:'.</problem_class>
|
||||
<description>Replace 'if' expression with elvis expression</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>doesNotInlineVariableInMultiDeclaration.kt</file>
|
||||
<line>7</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/src/doesNotInlineVariableInMultiDeclaration.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">If-Then foldable to '?:'.</problem_class>
|
||||
<description>Replace 'if' expression with elvis expression</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>doesNotinlineValueIfUsedMoreThanOnce.kt</file>
|
||||
<line>11</line>
|
||||
|
||||
Reference in New Issue
Block a user