annotation() now has no arguments. Syntax migration to Retention / Repeatable / MustBeDocumented combination
Deprecated test for annotation(params) completion deleted. A lot of tests changed.
This commit is contained in:
committed by
Mikhail Glukhikh
parent
86f35acf9e
commit
eab288bdd7
+12
-12
@@ -283,7 +283,7 @@ public interface Comparable</*0*/ in T> {
|
||||
public abstract fun compareTo(/*0*/ other: T): kotlin.Int
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation(mustBeDocumented = true) public final class Deprecated : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class Deprecated : kotlin.Annotation {
|
||||
/*primary*/ public constructor Deprecated(/*0*/ value: kotlin.String, /*1*/ replaceWith: kotlin.ReplaceWith = ...)
|
||||
internal final val replaceWith: kotlin.ReplaceWith
|
||||
internal final fun <get-replaceWith>(): kotlin.ReplaceWith
|
||||
@@ -435,7 +435,7 @@ public abstract class Enum</*0*/ E : kotlin.Enum<E>> : kotlin.Comparable<E> {
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.annotation(mustBeDocumented = true) public final class Extension : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class Extension : kotlin.Annotation {
|
||||
/*primary*/ public constructor Extension()
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ public interface FloatingPointConstants</*0*/ T> {
|
||||
public interface Function</*0*/ out R> {
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.BINARY) public final class HiddenDeclaration : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR}) kotlin.annotation.Retention(value = AnnotationRetention.BINARY) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class HiddenDeclaration : kotlin.Annotation {
|
||||
/*primary*/ public constructor HiddenDeclaration()
|
||||
}
|
||||
|
||||
@@ -1092,7 +1092,7 @@ public interface Range</*0*/ T : kotlin.Comparable<T>> {
|
||||
public open fun isEmpty(): kotlin.Boolean
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.BINARY) public final class ReplaceWith : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {}) kotlin.annotation.Retention(value = AnnotationRetention.BINARY) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class ReplaceWith : kotlin.Annotation {
|
||||
/*primary*/ public constructor ReplaceWith(/*0*/ expression: kotlin.String, /*1*/ vararg imports: kotlin.String /*kotlin.Array<out kotlin.String>*/)
|
||||
internal final val expression: kotlin.String
|
||||
internal final fun <get-expression>(): kotlin.String
|
||||
@@ -1251,7 +1251,7 @@ public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequenc
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPE, AnnotationTarget.EXPRESSION, AnnotationTarget.FILE}) kotlin.annotation.annotation(retention = AnnotationRetention.SOURCE) public final class Suppress : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPE, AnnotationTarget.EXPRESSION, AnnotationTarget.FILE}) kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.annotation() public final class Suppress : kotlin.Annotation {
|
||||
/*primary*/ public constructor Suppress(/*0*/ vararg names: kotlin.String /*kotlin.Array<out kotlin.String>*/)
|
||||
internal final val names: kotlin.Array<out kotlin.String>
|
||||
internal final fun <get-names>(): kotlin.Array<out kotlin.String>
|
||||
@@ -1268,34 +1268,34 @@ public object Unit {
|
||||
/*primary*/ private constructor Unit()
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) kotlin.annotation.annotation(mustBeDocumented = true) public final class data : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class data : kotlin.Annotation {
|
||||
/*primary*/ public constructor data()
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.SOURCE) public final class external : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER}) kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class external : kotlin.Annotation {
|
||||
/*primary*/ public constructor external()
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.RUNTIME) public final class inline : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY}) kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class inline : kotlin.Annotation {
|
||||
/*primary*/ public constructor inline(/*0*/ strategy: kotlin.InlineStrategy = ...)
|
||||
public final val strategy: kotlin.InlineStrategy
|
||||
public final fun <get-strategy>(): kotlin.InlineStrategy
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.RUNTIME) public final class inlineOptions : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class inlineOptions : kotlin.Annotation {
|
||||
/*primary*/ public constructor inlineOptions(/*0*/ vararg value: kotlin.InlineOption /*kotlin.Array<out kotlin.InlineOption>*/)
|
||||
internal final val value: kotlin.Array<out kotlin.InlineOption>
|
||||
internal final fun <get-value>(): kotlin.Array<out kotlin.InlineOption>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.RUNTIME) public final class noinline : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() public final class noinline : kotlin.Annotation {
|
||||
/*primary*/ public constructor noinline()
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION}) kotlin.annotation.annotation(retention = AnnotationRetention.SOURCE) public final class tailRecursive : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION}) kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.annotation() public final class tailRecursive : kotlin.Annotation {
|
||||
/*primary*/ public constructor tailRecursive()
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION}) kotlin.annotation.annotation(retention = AnnotationRetention.SOURCE) public final class tailrec : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION}) kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.annotation() public final class tailrec : kotlin.Annotation {
|
||||
/*primary*/ public constructor tailrec()
|
||||
}
|
||||
|
||||
Vendored
+2
-1
@@ -12,7 +12,8 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val i: Int,
|
||||
val s: Short,
|
||||
val f: Float,
|
||||
|
||||
+2
-1
@@ -17,7 +17,8 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val i: Int,
|
||||
val s: Short,
|
||||
val f: Float,
|
||||
|
||||
+2
-1
@@ -13,7 +13,8 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val i: Int,
|
||||
val s: Short,
|
||||
val f: Float,
|
||||
|
||||
Vendored
+2
-1
@@ -1,7 +1,8 @@
|
||||
import java.lang.reflect.Method
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(val x: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun testMethod(method: Method, name: String) {
|
||||
assertEquals("OK", method.getAnnotation(javaClass<Ann>()).x, "On method of test named `$name`")
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@ import java.lang.reflect.Method
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
target(AnnotationTarget.EXPRESSION)
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(val x: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun testMethod(method: Method, name: String) {
|
||||
assertEquals("OK", method.getAnnotation(javaClass<Ann>()).x, "On method of test named `$name`")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME)
|
||||
class Ann(val args: Array<KClass<*>>)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val args: Array<KClass<*>>)
|
||||
|
||||
fun box(): String {
|
||||
val args = javaClass<Test>().getAnnotation(javaClass<Ann>()).args
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME)
|
||||
class Ann(val arg: KClass<*>)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val arg: KClass<*>)
|
||||
|
||||
fun box(): String {
|
||||
val argName = javaClass<Test>().getAnnotation(javaClass<Ann>()).arg.simpleName ?: "fail 1"
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME)
|
||||
class Ann(vararg val args: KClass<*>)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(vararg val args: KClass<*>)
|
||||
|
||||
fun box(): String {
|
||||
val args = javaClass<Test>().getAnnotation(javaClass<Ann>()).args
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
import kotlin.jvm.JvmStatic
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class testAnnotation
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class testAnnotation
|
||||
|
||||
class A {
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// KT-5665
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class First
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class First
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Second(val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Second(val value: String)
|
||||
|
||||
enum class E {
|
||||
@First
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
import java.lang.reflect.Method
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(val x: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun foo0(block: () -> Unit) = block.javaClass
|
||||
fun foo1(block: (String) -> Unit) = block.javaClass
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@ import java.lang.reflect.Method
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
target(AnnotationTarget.EXPRESSION)
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(val x: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val x: String)
|
||||
|
||||
fun foo0(block: () -> Unit) = block.javaClass
|
||||
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(val x: Int)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val x: Int)
|
||||
class A {
|
||||
Ann(1) fun foo(x: Int, y: Int = 2, z: Int) {}
|
||||
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val i: Int = 1,
|
||||
val s: String = "a",
|
||||
val a: Ann2 = Ann2(),
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class First
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class First
|
||||
|
||||
class MyClass() {
|
||||
public var x: String by Delegate()
|
||||
|
||||
Vendored
+2
-1
@@ -15,7 +15,8 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val i: Int,
|
||||
val s: Short,
|
||||
val f: Float,
|
||||
|
||||
+2
-1
@@ -15,7 +15,8 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val i: Int,
|
||||
val s: Short,
|
||||
val f: Float,
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(val i: Int)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val i: Int)
|
||||
|
||||
class A {
|
||||
class B {
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val b: Byte,
|
||||
val s: Short,
|
||||
val i: Int,
|
||||
|
||||
Vendored
+2
-1
@@ -7,7 +7,8 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(val i: Int)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val i: Int)
|
||||
|
||||
val i2: Int = 1
|
||||
val i: Int = i2
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(vararg val p: Int)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(vararg val p: Int)
|
||||
|
||||
Ann() class MyClass1
|
||||
Ann(1) class MyClass2
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package test
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(val c1: Int)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val c1: Int)
|
||||
|
||||
Ann('a' - 'a') class MyClass
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val b: Byte,
|
||||
val s: Short,
|
||||
val i: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
val p2: Int,
|
||||
val p3: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
val p2: Short,
|
||||
val p3: Byte,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
val p2: Int,
|
||||
val p3: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
val p2: Byte,
|
||||
val p4: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
val p2: Int,
|
||||
val p4: Long,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
val p2: Short,
|
||||
val p3: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
val p2: Short,
|
||||
val p3: Int,
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
val p2: Short,
|
||||
val p3: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
val p2: Short,
|
||||
val p3: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
val p2: Short,
|
||||
val p3: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
val p2: Int,
|
||||
val p3: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
val p2: Short,
|
||||
val p3: Int,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
val p2: Short,
|
||||
val p3: Int,
|
||||
|
||||
Vendored
+6
-7
@@ -1,15 +1,14 @@
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Anno
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Anno
|
||||
|
||||
fun box(): String {
|
||||
val a = Anno::class.annotations
|
||||
/*
|
||||
// TODO: support kotlin.annotation.annotation
|
||||
|
||||
if (a.size() != 1) return "Fail 1: $a"
|
||||
val ann = a.single() as? annotation ?: return "Fail 2: ${a.single()}"
|
||||
assertEquals(AnnotationRetention.RUNTIME, ann.retention)
|
||||
*/
|
||||
assert(a.isEmpty())
|
||||
val ann = a.single() as? Retention ?: return "Fail 2: ${a.single()}"
|
||||
assertEquals(AnnotationRetention.RUNTIME, ann.value)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
+8
-3
@@ -1,8 +1,13 @@
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
annotation(retention = AnnotationRetention.SOURCE) class SourceAnno
|
||||
annotation(retention = AnnotationRetention.BINARY) class BinaryAnno
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class RuntimeAnno
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class SourceAnno
|
||||
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class BinaryAnno
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class RuntimeAnno
|
||||
|
||||
@SourceAnno
|
||||
@BinaryAnno
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Simple(val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Simple(val value: String)
|
||||
|
||||
@Simple("OK")
|
||||
class A
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Simple(val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Simple(val value: String)
|
||||
|
||||
@Simple("OK")
|
||||
fun box(): String {
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Simple(val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Simple(val value: String)
|
||||
|
||||
fun test(@Simple("OK") x: Int) {}
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Simple(val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Simple(val value: String)
|
||||
|
||||
@property:Simple("OK")
|
||||
val foo: Int = 0
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME)
|
||||
class Ann(val args: Array<KClass<*>>)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val args: Array<KClass<*>>)
|
||||
|
||||
class O
|
||||
class K
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME)
|
||||
class Ann(val arg: KClass<*>)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val arg: KClass<*>)
|
||||
|
||||
class OK
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME)
|
||||
class Ann(vararg val args: KClass<*>)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(vararg val args: KClass<*>)
|
||||
|
||||
class O
|
||||
class K
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import java.lang.annotation.Annotation
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class foo(val name : String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class foo(val name : String)
|
||||
|
||||
class Test() {
|
||||
foo("OK") fun hello(input : String) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Ann class MyClass
|
||||
|
||||
annotation(retention = AnnotationRetention.BINARY) class Ann
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class Ann
|
||||
|
||||
// 1 @LAnn;()
|
||||
// 1 invisible
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Ann class MyClass
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann
|
||||
|
||||
// 1 @LAnn;()
|
||||
// 0 invisible
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Ann class MyClass
|
||||
|
||||
annotation(retention = AnnotationRetention.SOURCE) class Ann
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class Ann
|
||||
|
||||
// 0 @LAnn;()
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class SomeAnnotation(val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class SomeAnnotation(val value: String)
|
||||
|
||||
class A {
|
||||
@SomeAnnotation("OK") val property: Int
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class SomeAnnotation(val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class SomeAnnotation(val value: String)
|
||||
|
||||
interface T {
|
||||
@SomeAnnotation("OK") val property: Int
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class SomeAnnotation(val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class SomeAnnotation(val value: String)
|
||||
|
||||
@SomeAnnotation("OK") val property: Int
|
||||
get() = 42
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package a
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann
|
||||
|
||||
interface Tr {
|
||||
Ann
|
||||
|
||||
@@ -11,4 +11,5 @@ public val c: Char = '\u03c0' // pi symbol
|
||||
|
||||
public val str: String = ":)"
|
||||
|
||||
public annotation(retention = AnnotationRetention.RUNTIME) class AnnotationClass(public val value: String)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
public annotation class AnnotationClass(public val value: String)
|
||||
+2
-1
@@ -6,7 +6,8 @@ class MyClass1
|
||||
Ann(i2, s2, f2, d2, l2, b2, bool2, c2, str2)
|
||||
class MyClass2
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Ann(
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val i: Int,
|
||||
val s: Short,
|
||||
val f: Float,
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
target(AnnotationTarget.EXPRESSION)
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class Ann(val x: Int = 1)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class Ann(val x: Int = 1)
|
||||
|
||||
inline fun bar(block: () -> Int): Int = block()
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
kotlin.inline() internal fun bar(/*0*/ block: () -> kotlin.Int): kotlin.Int
|
||||
internal fun foo(): kotlin.Unit
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class Ann : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ x: kotlin.Int = ...)
|
||||
internal final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
target(AnnotationTarget.TYPE, AnnotationTarget.CLASSIFIER,
|
||||
AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION,
|
||||
AnnotationTarget.EXPRESSION, AnnotationTarget.PROPERTY)
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class Ann(val x: Int = 6)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class Ann(val x: Int = 6)
|
||||
|
||||
@Ann(1) @Ann(2) @Ann(3) @private class A @Ann constructor() {
|
||||
@Ann(x = 5) fun foo() {
|
||||
|
||||
@@ -10,7 +10,7 @@ Ann(x = 1) Ann(x = 2) Ann(x = 3) private final class A {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE, AnnotationTarget.CLASSIFIER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.EXPRESSION, AnnotationTarget.PROPERTY}) kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class Ann : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE, AnnotationTarget.CLASSIFIER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.EXPRESSION, AnnotationTarget.PROPERTY}) kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ x: kotlin.Int = ...)
|
||||
internal final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
annotation(mustBeDocumented = true) class DocAnn
|
||||
@MustBeDocumented
|
||||
annotation class DocAnn
|
||||
|
||||
annotation class NotDocAnn
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
kotlin.annotation.annotation(mustBeDocumented = true) internal final class DocAnn : kotlin.Annotation {
|
||||
kotlin.annotation.MustBeDocumented() kotlin.annotation.annotation() internal final class DocAnn : kotlin.Annotation {
|
||||
public constructor DocAnn()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
annotation(repeatable = true) class repann
|
||||
@Repeatable
|
||||
annotation class repann
|
||||
|
||||
annotation(retention = AnnotationRetention.SOURCE, repeatable = true) class repann1(val x: Int)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class repann1(val x: Int)
|
||||
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class repann2(val f: Boolean)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class repann2(val f: Boolean)
|
||||
|
||||
annotation(repeatable = true, retention = AnnotationRetention.BINARY) class binrepann
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@Repeatable
|
||||
annotation class binrepann
|
||||
|
||||
target(AnnotationTarget.EXPRESSION) annotation(repeatable = true) class repexpr
|
||||
target(AnnotationTarget.EXPRESSION)
|
||||
@Repeatable
|
||||
annotation class repexpr
|
||||
|
||||
repann <!NON_SOURCE_REPEATED_ANNOTATION!>repann<!> class DoubleAnnotated
|
||||
|
||||
|
||||
@@ -30,21 +30,21 @@ repann1(x = 1) repann1(x = 2) repann1(x = 3) internal final class TripleAnnotate
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.BINARY) internal final class binrepann : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.BINARY) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class binrepann : kotlin.Annotation {
|
||||
public constructor binrepann()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true) internal final class repann : kotlin.Annotation {
|
||||
kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class repann : kotlin.Annotation {
|
||||
public constructor repann()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class repann1 : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class repann1 : kotlin.Annotation {
|
||||
public constructor repann1(/*0*/ x: kotlin.Int)
|
||||
internal final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -52,7 +52,7 @@ kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class repann2 : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class repann2 : kotlin.Annotation {
|
||||
public constructor repann2(/*0*/ f: kotlin.Boolean)
|
||||
internal final val f: kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -60,7 +60,7 @@ kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.annotation(repeatable = true) internal final class repexpr : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class repexpr : kotlin.Annotation {
|
||||
public constructor repexpr()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
annotation(AnnotationRetention.SOURCE) class sourceann
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class sourceann
|
||||
|
||||
sourceann class AnnotatedAtSource
|
||||
|
||||
@@ -7,7 +7,7 @@ sourceann() internal final class AnnotatedAtSource {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(retention = AnnotationRetention.SOURCE) internal final class sourceann : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.annotation() internal final class sourceann : kotlin.Annotation {
|
||||
public constructor sourceann()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
annotation(repeatable = false) class unrepann(val x: Int)
|
||||
annotation class unrepann(val x: Int)
|
||||
|
||||
annotation class ann(val y: Int)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(repeatable = false) internal final class unrepann : kotlin.Annotation {
|
||||
kotlin.annotation.annotation() internal final class unrepann : kotlin.Annotation {
|
||||
public constructor unrepann(/*0*/ x: kotlin.Int)
|
||||
internal final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class RepeatableAnn
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class RepeatableAnn
|
||||
annotation class Ann
|
||||
|
||||
public class A(@param:Ann <!REPEATED_ANNOTATION!>@Ann<!> val x: Int, @param: RepeatableAnn @Ann val y: Int) {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ kotlin.annotation.annotation() internal final class Ann : kotlin.Annotation {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class RepeatableAnn : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class RepeatableAnn : kotlin.Annotation {
|
||||
public constructor RepeatableAnn()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
target(AnnotationTarget.EXPRESSION)
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class Ann
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class Ann
|
||||
|
||||
fun <T> bar(block: (T) -> Int) {}
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
internal fun </*0*/ T> bar(/*0*/ block: (T) -> kotlin.Int): kotlin.Unit
|
||||
internal fun foo(): kotlin.Unit
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class Ann : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class Ann : kotlin.Annotation {
|
||||
public constructor Ann()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.kt
Vendored
+6
-2
@@ -1,4 +1,6 @@
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class Ann(val i: IntArray)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class Ann(val i: IntArray)
|
||||
|
||||
Ann(intArrayOf(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>i<!>))
|
||||
Ann(intArrayOf(i2))
|
||||
@@ -13,7 +15,9 @@ val i3 = foo()
|
||||
|
||||
fun foo(): Int = 1
|
||||
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class AnnAnn(val i: Array<Ann>)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class AnnAnn(val i: Array<Ann>)
|
||||
AnnAnn(arrayOf(Ann(intArrayOf(1))))
|
||||
AnnAnn(arrayOf(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>iAnn<!>))
|
||||
class TestAnn
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ internal val i3: kotlin.Int
|
||||
internal val iAnn: Ann
|
||||
internal fun foo(): kotlin.Int
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class Ann : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ i: kotlin.IntArray)
|
||||
internal final val i: kotlin.IntArray
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -14,7 +14,7 @@ kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class AnnAnn : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class AnnAnn : kotlin.Annotation {
|
||||
public constructor AnnAnn(/*0*/ i: kotlin.Array<Ann>)
|
||||
internal final val i: kotlin.Array<Ann>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class Ann(val i: Int)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class Ann(val i: Int)
|
||||
annotation class AnnIA(val ia: IntArray)
|
||||
annotation class AnnSA(val sa: Array<String>)
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ internal val ia: kotlin.IntArray
|
||||
internal val sa: kotlin.Array<kotlin.String>
|
||||
internal fun foo(): kotlin.Int
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class Ann : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ i: kotlin.Int)
|
||||
internal final val i: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+6
-2
@@ -1,4 +1,6 @@
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class Ann(vararg val i: Int)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class Ann(vararg val i: Int)
|
||||
|
||||
Ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>i<!>)
|
||||
Ann(i2)
|
||||
@@ -16,7 +18,9 @@ val i3 = foo()
|
||||
|
||||
fun foo(): Int = 1
|
||||
|
||||
annotation(repeatable = true, retention = AnnotationRetention.SOURCE) class AnnAnn(vararg val i: Ann)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Repeatable
|
||||
annotation class AnnAnn(vararg val i: Ann)
|
||||
AnnAnn(*arrayOf(Ann(1)))
|
||||
AnnAnn(*arrayOf(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>iAnn<!>))
|
||||
class TestAnn
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ internal val i3: kotlin.Int
|
||||
internal val iAnn: Ann
|
||||
internal fun foo(): kotlin.Int
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class Ann : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ vararg i: kotlin.Int /*kotlin.IntArray*/)
|
||||
internal final val i: kotlin.IntArray
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -14,7 +14,7 @@ kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation(repeatable = true, retention = AnnotationRetention.SOURCE) internal final class AnnAnn : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) kotlin.annotation.Repeatable() kotlin.annotation.annotation() internal final class AnnAnn : kotlin.Annotation {
|
||||
public constructor AnnAnn(/*0*/ vararg i: Ann /*kotlin.Array<out Ann>*/)
|
||||
internal final val i: kotlin.Array<out Ann>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
//SKIP_IN_RUNTIME_TEST
|
||||
package test
|
||||
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Anno
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Anno
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
kotlin.annotation.annotation(retention = AnnotationRetention.RUNTIME) internal final class Anno : kotlin.Annotation {
|
||||
kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) kotlin.annotation.annotation() internal final class Anno : kotlin.Annotation {
|
||||
/*primary*/ public constructor Anno()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user