Replace deprecated symbol usage in whole project: enable on annotation declared without parentheses #KT-12479 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-11-16 14:20:47 +09:00
committed by Mikhail Glukhikh
parent fa51354ef9
commit 8089d2e9e3
8 changed files with 64 additions and 0 deletions
@@ -0,0 +1,9 @@
package dependency
@Deprecated("", ReplaceWith("dependency.NewAnnotation"))
annotation class OldAnnotation
annotation class NewAnnotation()
@NewAnnotation
class C
@@ -0,0 +1,9 @@
// "Replace with 'test.Bar'" "true"
package x
import dependency.*
annotation class A(val a: NewAnnotation)
@A(NewAnnotation()) class Y
@@ -0,0 +1,11 @@
// "Replace usages of 'OldAnnotation' in whole project" "true"
package test
import dependency.NewAnnotation
fun foo(a: NewAnnotation) {
}
@<caret>NewAnnotation
class X
@@ -0,0 +1,9 @@
package dependency
@Deprecated("", ReplaceWith("dependency.NewAnnotation"))
annotation class OldAnnotation
annotation class NewAnnotation()
@OldAnnotation
class C
@@ -0,0 +1,11 @@
// "Replace usages of 'OldAnnotation' in whole project" "true"
package test
import dependency.OldAnnotation
fun foo(a: OldAnnotation) {
}
@<caret>OldAnnotation
class X
@@ -0,0 +1,9 @@
// "Replace with 'test.Bar'" "true"
package x
import dependency.*
annotation class A(val a: OldAnnotation)
@A(OldAnnotation()) class Y