Files
openide/plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/DeprecatedCallableAddReplaceWith.html
Nikita Bobko 8b91f1c7c0 Kotlin plugin inspection descriptions: 'A quick-fix' -> 'The quick-fix'
Review: https://jetbrains.team/p/ij/reviews/98339

It's a concrete quick-fix

GitOrigin-RevId: 3388021f0cde4cb49f8c447361c0d8b2fd08cafd
2022-12-01 13:43:09 +00:00

26 lines
799 B
HTML

<html>
<body>
Reports deprecated functions and properties that do not have the <code>kotlin.ReplaceWith</code> argument in its
<code>kotlin.deprecated</code> annotation and suggests to add one based on their body.
<p>
Kotlin provides the <code>ReplaceWith</code> argument to replace deprecated declarations automatically.
It is recommended to use the argument to fix deprecation issues in code.
</p>
<p><b>Example:</b></p>
<pre><code>
@Deprecated("Use refined() instead.")
fun deprecated() = refined()
fun refined() = 42
</code></pre>
<p>The quick-fix adds the <code>ReplaceWith()</code> argument:</p>
<pre><code>
@Deprecated("Use refined() instead.", ReplaceWith("refined()"))
fun deprecated() = refined()
fun refined() = 42
</code></pre>
<!-- tooltip end -->
</body>
</html>