Better replacement for annotations with parameters in ReplaceWIth pattern but still lot of safety pre-checks to be added
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with 'Bar(p, "")'" "true"
|
||||
|
||||
package test
|
||||
|
||||
@Deprecated("Replace with bar", ReplaceWith("Bar(p, \"\")"))
|
||||
annotation class Foo(val p: Int)
|
||||
|
||||
annotation class Bar(val p: Int, val s: String)
|
||||
|
||||
@Foo<caret>(p = 1) class C
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with 'Bar(p, "")'" "true"
|
||||
|
||||
package test
|
||||
|
||||
@Deprecated("Replace with bar", ReplaceWith("Bar(p, \"\")"))
|
||||
annotation class Foo(val p: Int)
|
||||
|
||||
annotation class Bar(val p: Int, val s: String)
|
||||
|
||||
@Bar(p = 1, s = "") class C
|
||||
Reference in New Issue
Block a user