[FIR] Add REPEATED_ANNOTATION_WITH_CONTAINER, NON_SOURCE_REPEATED_ANNOTATION
REPEATED_ANNOTATION_TARGET6
This commit is contained in:
committed by
TeamCityServer
parent
2baed77598
commit
97bc079634
+2
-2
@@ -50,12 +50,12 @@ fun jr1() {}
|
||||
|
||||
@JR
|
||||
@JR.Container()
|
||||
@JR
|
||||
<!NON_SOURCE_REPEATED_ANNOTATION!>@JR<!>
|
||||
fun jr2() {}
|
||||
|
||||
@JR
|
||||
@JR.Container(JR())
|
||||
@JR
|
||||
<!NON_SOURCE_REPEATED_ANNOTATION!>@JR<!>
|
||||
fun jr3() {}
|
||||
|
||||
@JR
|
||||
|
||||
-142
@@ -1,142 +0,0 @@
|
||||
// !LANGUAGE: +RepeatableAnnotations
|
||||
// FULL_JDK
|
||||
// FILE: JR.java
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Repeatable(JR.Container.class)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JR {
|
||||
public @interface Container {
|
||||
JR[] value();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: JS.java
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Repeatable(JS.Container.class)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface JS {
|
||||
public @interface Container {
|
||||
JS[] value();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: KR.kt
|
||||
|
||||
@java.lang.annotation.Repeatable(KR.Container::class)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class KR {
|
||||
annotation class Container(val value: Array<KR>)
|
||||
}
|
||||
|
||||
// FILE: KS.kt
|
||||
|
||||
@java.lang.annotation.Repeatable(KS.Container::class)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class KS {
|
||||
annotation class Container(val value: Array<KS>)
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
// Java runtime-retained annotation
|
||||
|
||||
@JR
|
||||
@JR.Container()
|
||||
fun jr1() {}
|
||||
|
||||
@JR
|
||||
@JR.Container()
|
||||
@JR
|
||||
fun jr2() {}
|
||||
|
||||
@JR
|
||||
@JR.Container(JR())
|
||||
@JR
|
||||
fun jr3() {}
|
||||
|
||||
@JR
|
||||
@JR.Container(JR())
|
||||
fun jr4() {}
|
||||
|
||||
@JR
|
||||
@JR.Container(JR(), JR())
|
||||
fun jr5() {}
|
||||
|
||||
|
||||
// Java source-retained annotation
|
||||
|
||||
@JS
|
||||
@JS.Container()
|
||||
fun js1() {}
|
||||
|
||||
@JS
|
||||
@JS.Container()
|
||||
@JS
|
||||
fun js2() {}
|
||||
|
||||
@JS
|
||||
@JS.Container(JS())
|
||||
@JS
|
||||
fun js3() {}
|
||||
|
||||
@JS
|
||||
@JS.Container(JS())
|
||||
fun js4() {}
|
||||
|
||||
@JS
|
||||
@JS.Container(JS(), JS())
|
||||
fun js5() {}
|
||||
|
||||
|
||||
// Kotlin runtime-retained annotation
|
||||
|
||||
@KR.Container([])
|
||||
@KR
|
||||
fun kr1() {}
|
||||
|
||||
@KR.Container([])
|
||||
@KR
|
||||
@KR
|
||||
fun kr2() {}
|
||||
|
||||
@KR
|
||||
@KR
|
||||
@KR.Container([KR()])
|
||||
fun kr3() {}
|
||||
|
||||
@KR.Container([KR()])
|
||||
@KR
|
||||
fun kr4() {}
|
||||
|
||||
@KR
|
||||
@KR.Container([KR(), KR()])
|
||||
fun kr5() {}
|
||||
|
||||
|
||||
// Kotlin source-retained annotation
|
||||
|
||||
@KS.Container([])
|
||||
@KS
|
||||
fun ks1() {}
|
||||
|
||||
@KS.Container([])
|
||||
@KS
|
||||
@KS
|
||||
fun ks2() {}
|
||||
|
||||
@KS
|
||||
@KS
|
||||
@KS.Container([KS()])
|
||||
fun ks3() {}
|
||||
|
||||
@KS.Container([KS()])
|
||||
@KS
|
||||
fun ks4() {}
|
||||
|
||||
@KS
|
||||
@KS.Container([KS(), KS()])
|
||||
fun ks5() {}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +RepeatableAnnotations
|
||||
// FULL_JDK
|
||||
// FILE: JR.java
|
||||
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
// !LANGUAGE: +RepeatableAnnotations
|
||||
// !JVM_TARGET: 1.6
|
||||
// FULL_JDK
|
||||
// FILE: Runtime.java
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Repeatable(Runtime.Container.class)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Runtime {
|
||||
public @interface Container {
|
||||
Runtime[] value();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Clazz.java
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Repeatable(Clazz.Container.class)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface Clazz {
|
||||
public @interface Container {
|
||||
Clazz[] value();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Source.java
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Repeatable(Source.Container.class)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Source {
|
||||
public @interface Container {
|
||||
Source[] value();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: usage.kt
|
||||
|
||||
@Runtime @Runtime
|
||||
class UseRuntime
|
||||
|
||||
@Clazz @Clazz
|
||||
class UseClazz
|
||||
|
||||
@Source @Source
|
||||
class UseSource
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +RepeatableAnnotations
|
||||
// !JVM_TARGET: 1.6
|
||||
// FULL_JDK
|
||||
|
||||
+2
-2
@@ -38,10 +38,10 @@ public @interface Source {
|
||||
|
||||
// FILE: usage.kt
|
||||
|
||||
@Runtime @Runtime
|
||||
@Runtime <!NON_SOURCE_REPEATED_ANNOTATION!>@Runtime<!>
|
||||
class UseRuntime
|
||||
|
||||
@Clazz @Clazz
|
||||
@Clazz <!NON_SOURCE_REPEATED_ANNOTATION!>@Clazz<!>
|
||||
class UseClazz
|
||||
|
||||
@Source @Source
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
// !LANGUAGE: -RepeatableAnnotations
|
||||
|
||||
@Repeatable
|
||||
annotation class repann
|
||||
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class repann1(val x: Int)
|
||||
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class repann2(val f: Boolean)
|
||||
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@Repeatable
|
||||
annotation class binrepann
|
||||
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class repexpr
|
||||
|
||||
@repann @repann class DoubleAnnotated
|
||||
|
||||
@repann1(1) @repann1(2) @repann1(3) class TripleAnnotated
|
||||
|
||||
@repann2(true) @repann2(false) @repann2(false) @repann2(true) class FourTimesAnnotated
|
||||
|
||||
@binrepann @binrepann class BinaryAnnotated
|
||||
|
||||
@repann @repann fun foo(@repann @repann x: Int): Int {
|
||||
@repexpr @repexpr return x
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: -RepeatableAnnotations
|
||||
|
||||
@Repeatable
|
||||
|
||||
Reference in New Issue
Block a user