Better replacement for annotations with parameters in ReplaceWIth pattern but still lot of safety pre-checks to be added

This commit is contained in:
Valentin Kipyatkov
2015-10-09 22:48:21 +03:00
parent 4290601807
commit 28c950ffbe
4 changed files with 36 additions and 4 deletions
@@ -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
@@ -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