Correctly apply annotation wrap before modifier keyword
#KT-20314 Fixed
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
||||
package to
|
||||
|
||||
@Volatile internal var field = 1
|
||||
@Volatile
|
||||
internal var field = 1
|
||||
@@ -1,4 +1,8 @@
|
||||
@Deprecated("Foo")
|
||||
@Deprecated("Bar")
|
||||
class Foo {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Foo")
|
||||
public class Q {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
@Deprecated("Foo") @Deprecated("Bar") class Foo {
|
||||
}
|
||||
|
||||
@Deprecated("Foo") public class Q {
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
annotation class Small(val i: Int, val s: String)
|
||||
|
||||
@Sma<caret>ll(1, "2") private fun test1() {
|
||||
@Small(1, "2")
|
||||
private fun test1() {
|
||||
|
||||
}
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
annotation class Small(val i: Int, val s: String)
|
||||
|
||||
@Small(<caret>1, "2") private fun test1() {
|
||||
@Small(1, "2")
|
||||
private fun test1() {
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
// "Add annotation target" "true"
|
||||
|
||||
@Target(AnnotationTarget.TYPE) annotation class Foo
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Foo
|
||||
|
||||
class Test {
|
||||
fun foo(): @Foo Int = 1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// "Add annotation target" "true"
|
||||
|
||||
@Target(AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) annotation class Foo
|
||||
@Target(AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class Foo
|
||||
|
||||
@Foo
|
||||
class Test {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Make 'A' open" "true"
|
||||
@Deprecated("") open class A() {
|
||||
@Deprecated("")
|
||||
open class A() {
|
||||
open fun foo() {}
|
||||
}
|
||||
|
||||
@@ -3,11 +3,13 @@ annotation class Concat
|
||||
|
||||
abstract class A {
|
||||
// INFO: {"checked": "true", "toAbstract": "true"}
|
||||
@Concat abstract var extraction: Int
|
||||
@Concat
|
||||
abstract var extraction: Int
|
||||
}
|
||||
|
||||
// SIBLING:
|
||||
class Abstraction : A() {
|
||||
// INFO: {"checked": "true", "toAbstract": "true"}
|
||||
@Concat override var extraction = 0
|
||||
@Concat
|
||||
override var extraction = 0
|
||||
}
|
||||
@@ -2,10 +2,12 @@ annotation class Concat
|
||||
|
||||
abstract class A {
|
||||
// INFO: {"checked": "true", "toAbstract": "true"}
|
||||
@Concat abstract var extraction: Int
|
||||
@Concat
|
||||
abstract var extraction: Int
|
||||
}
|
||||
|
||||
class Abstraction : A() {
|
||||
// INFO: {"checked": "true", "toAbstract": "true"}
|
||||
@Concat override var extraction = 0
|
||||
@Concat
|
||||
override var extraction = 0
|
||||
}
|
||||
Reference in New Issue
Block a user