Files
openide/plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/SimplifyNegatedBinaryExpression.html
Alexey Belkov a500eeeee4 [kotlin] SimplifyNegatedBinaryExpressionInspection cleanup
^KTIJ-13841

GitOrigin-RevId: a10eb4e7394d5f8a17adf7da7e5bad54acba3048
2022-10-25 09:49:36 +00:00

31 lines
698 B
HTML

<html>
<body>
Reports negated boolean expressions that can be simplified.
<p>The quick-fix simplifies the boolean expression.</p>
<p><b>Example:</b></p>
<pre><code>
fun test(n: Int) {
!(0 == 1)
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
fun test(n: Int) {
0 != 1
}
</code></pre>
<p>Please note that this action may change code semantics if IEEE-754 NaN values are involved:</p>
<pre><code>
fun main() {
println(!(Double.NaN &gt;= 0)) // true
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
fun main() {
println(Double.NaN &lt; 0) // false
}
</code></pre>
<!-- tooltip end -->
</body>
</html>