Add options for wrapping local variable and property annotations
#KT-14950 Fixed
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
@Deprecated
|
||||
@Named("foo")
|
||||
val bar = 1
|
||||
}
|
||||
|
||||
// SET_INT: VARIABLE_ANNOTATION_WRAP = 2
|
||||
@@ -0,0 +1,5 @@
|
||||
fun foo() {
|
||||
@Deprecated @Named("foo") val bar = 1
|
||||
}
|
||||
|
||||
// SET_INT: VARIABLE_ANNOTATION_WRAP = 2
|
||||
@@ -0,0 +1,5 @@
|
||||
@Deprecated
|
||||
@Named("foo")
|
||||
val bar = 1
|
||||
|
||||
// SET_INT: FIELD_ANNOTATION_WRAP = 2
|
||||
@@ -0,0 +1,3 @@
|
||||
@Deprecated @Named("foo") val bar = 1
|
||||
|
||||
// SET_INT: FIELD_ANNOTATION_WRAP = 2
|
||||
+15
-4
@@ -67,7 +67,12 @@ annotation class A1
|
||||
|
||||
annotation class A2
|
||||
|
||||
private @[A1 A2 A1] @A1 @A2 @[A1 A2 A2] @[A1] val fooProp1 = 1
|
||||
private @[A1 A2 A1]
|
||||
@A1
|
||||
@A2
|
||||
@[A1 A2 A2]
|
||||
@[A1]
|
||||
val fooProp1 = 1
|
||||
|
||||
private @[
|
||||
|
||||
@@ -75,17 +80,23 @@ private @[
|
||||
A1
|
||||
|
||||
|
||||
A2 A1] @A1 @A2 @[A1
|
||||
A2 A1]
|
||||
@A1
|
||||
@A2
|
||||
@[A1
|
||||
A2
|
||||
|
||||
|
||||
A2
|
||||
|
||||
] @[A1] val fooProp1 = 1
|
||||
]
|
||||
@[A1]
|
||||
val fooProp1 = 1
|
||||
|
||||
private @A1
|
||||
|
||||
@A2 val
|
||||
@A2
|
||||
val
|
||||
fooProp2 = 1
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@ annotation class X(val s: String)
|
||||
|
||||
class A(val n: Int) {
|
||||
val t = 1
|
||||
internal @X("1") val <T : Number> T.foo: Boolean
|
||||
internal @X("1")
|
||||
val <T : Number> T.foo: Boolean
|
||||
get() = toInt() - n > 1
|
||||
val u = 2
|
||||
}
|
||||
|
||||
+2
-1
@@ -4,5 +4,6 @@ annotation class Annotation3(val a: Int = 0)
|
||||
|
||||
|
||||
class TestClass(@Annotation1(42) @Annotation3(42) text: String = "LoremIpsum") {
|
||||
private @Annotation1(42) @field:Annotation2(42) val text = text
|
||||
private @Annotation1(42) @field:Annotation2(42)
|
||||
val text = text
|
||||
}
|
||||
+2
-1
@@ -3,5 +3,6 @@
|
||||
annotation class PropertyAnnotation(val a: Int = 0)
|
||||
|
||||
class TestClass(text: String = "LoremIpsum") {
|
||||
private @PropertyAnnotation(42) val text = text
|
||||
private @PropertyAnnotation(42)
|
||||
val text = text
|
||||
}
|
||||
Reference in New Issue
Block a user