Implement annotation related migrational quick fixes
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// "Replace with 'data'" "true"
|
||||
|
||||
@data<caret>
|
||||
/* abc*/(1)
|
||||
class A
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Replace with 'data'" "true"
|
||||
|
||||
data/* abc*/
|
||||
class A
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Replace with 'inline'" "true"
|
||||
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
kotlin.inline<caret> fun foo() {}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Replace with 'inline'" "true"
|
||||
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
inline fun foo() {}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Replace with 'data'" "true"
|
||||
|
||||
annotation class Ann
|
||||
@[dat<caret>a Ann]
|
||||
/* abc*/
|
||||
class A
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Replace with 'data'" "true"
|
||||
|
||||
annotation class Ann
|
||||
@[Ann]
|
||||
data /* abc*/
|
||||
class A
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Replace with 'data'" "true"
|
||||
|
||||
@[dat<caret>a]
|
||||
/* abc*/
|
||||
class A
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Replace with 'data'" "true"
|
||||
|
||||
data /* abc*/
|
||||
class A
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Replace with 'kotlin.Deprecated'" "true"
|
||||
@deprecated<caret>("")
|
||||
class A
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Replace with 'kotlin.Deprecated'" "true"
|
||||
@Deprecated<caret>("")
|
||||
class A
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Replace with 'kotlin.Deprecated'" "true"
|
||||
|
||||
fun foo(x: kotlin.deprecated<caret>) {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Replace with 'kotlin.Deprecated'" "true"
|
||||
|
||||
fun foo(x: Deprecated) {}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Remove '@'" "true"
|
||||
|
||||
@private<caret>
|
||||
/* abc*/
|
||||
class A
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Remove '@'" "true"
|
||||
|
||||
private
|
||||
/* abc*/
|
||||
class A
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Replace with 'crossinline'" "true"
|
||||
|
||||
inline fun inlineFun(@inlineOptions(InlineOption.ONLY_LOCAL_RETURN)<caret> block: () -> Int) {}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Replace with 'crossinline'" "true"
|
||||
|
||||
inline fun inlineFun(crossinline block: () -> Int) {}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Remove annotation" "true"
|
||||
|
||||
inline fun inlineFun(@inlineOptions(InlineOption.LOCAL_CONTINUE_AND_BREAK)<caret> block: () -> Int) {}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Remove annotation" "true"
|
||||
|
||||
inline fun inlineFun(block: () -> Int) {}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'tailrec'" "true"
|
||||
|
||||
@tailRecursive<caret>
|
||||
fun foo() {
|
||||
if (1 > 2) {
|
||||
foo()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'tailrec'" "true"
|
||||
|
||||
tailrec
|
||||
fun foo() {
|
||||
if (1 > 2) {
|
||||
foo()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Add '@' before annotation" "true"
|
||||
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
Ann<caret>
|
||||
/* abc*/(1)
|
||||
class A
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Add '@' before annotation" "true"
|
||||
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
@Ann<caret>
|
||||
/* abc*/(1)
|
||||
class A
|
||||
Reference in New Issue
Block a user