Files
openide/plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/ReplaceWithOperatorAssignment.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

21 lines
535 B
HTML

<html>
<body>
Reports modifications of variables with a simple assignment (such as <code>y = y + x</code>) that can be replaced with an operator assignment.
<p>The quick-fix replaces the assignment with an assignment operator.</p>
<p><b>Example:</b></p>
<pre><code>
fun foo() {
val list = mutableListOf(1, 2, 3)
list = list + 4
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
fun foo() {
val list = mutableListOf(1, 2, 3)
list += 4
}
</code></pre>
<!-- tooltip end -->
</body>
</html>