mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
31 lines
698 B
HTML
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 >= 0)) // true
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
fun main() {
|
|
println(Double.NaN < 0) // false
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |