Migrate RetentionPolicy arguments in deprecated Java quick-fix

#KT-29666 Fixed
This commit is contained in:
Matthew Runo
2019-05-07 00:12:59 +03:00
committed by Mikhail Glukhikh
parent db5396c1c2
commit 39f576d75c
9 changed files with 96 additions and 38 deletions
@@ -1,5 +1,4 @@
// "Replace annotation with kotlin.annotation.Retention" "true"
// ERROR: Type mismatch: inferred type is RetentionPolicy but AnnotationRetention was expected
import java.lang.annotation.RetentionPolicy
import java.lang.annotation.Retention
@@ -1,8 +1,4 @@
// "Replace annotation with kotlin.annotation.Retention" "true"
// ERROR: Type mismatch: inferred type is RetentionPolicy but AnnotationRetention was expected
import java.lang.annotation.RetentionPolicy
import kotlin.annotation.Retention
@Retention<caret>(RetentionPolicy.SOURCE)
@<caret>Retention(AnnotationRetention.SOURCE)
annotation class Foo
@@ -0,0 +1,7 @@
// "Replace annotation with kotlin.annotation.Retention" "true"
import java.lang.annotation.RetentionPolicy
import java.lang.annotation.Retention
@Retention<caret>(RetentionPolicy.CLASS)
annotation class Foo
@@ -0,0 +1,4 @@
// "Replace annotation with kotlin.annotation.Retention" "true"
@<caret>Retention(AnnotationRetention.BINARY)
annotation class Foo
@@ -0,0 +1,7 @@
// "Replace annotation with kotlin.annotation.Retention" "true"
import java.lang.annotation.RetentionPolicy
import java.lang.annotation.Retention
@Retention<caret>(RetentionPolicy.RUNTIME)
annotation class Foo
@@ -0,0 +1,4 @@
// "Replace annotation with kotlin.annotation.Retention" "true"
@<caret>Retention(AnnotationRetention.RUNTIME)
annotation class Foo
@@ -1,6 +1,4 @@
// "Replace annotation with kotlin.annotation.MustBeDocumented" "true"
import kotlin.annotation.MustBeDocumented
@MustBeDocumented<caret>
annotation class Foo