Migrate RetentionPolicy arguments in deprecated Java quick-fix
#KT-29666 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
db5396c1c2
commit
39f576d75c
@@ -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
|
||||
Reference in New Issue
Block a user