Files
openide/plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/WrapUnaryOperator.html
Ilya Kirillov 3386f8f5a9 [kotlin] move inspection descriptions to separate module to reuse in K2
GitOrigin-RevId: e9d7382f4d640e27b1958d1bf2d4c3e639915137
2022-07-13 09:59:31 +00:00

9 lines
467 B
HTML

<html>
<body>
Reports an unary operator followed by a dot qualifier such as <code>-1.inc()</code>.
<p>Code like <code>-1.inc()</code> can be misleading because <code>-</code> has a lower precedence than <code>.inc()</code>.
As a result, <code>-1.inc()</code> evaluates to <code>-2</code> and not <code>0</code> as it might be expected.</p>
<p><b>Wrap unary operator and value with ()</b> quick-fix can be used to amend the code automatically.</p>
</body>
</html>