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:
Mikhail Glukhikh
2015-09-03 18:34:48 +03:00
committed by Mikhail Glukhikh
parent 86f35acf9e
commit eab288bdd7
99 changed files with 300 additions and 187 deletions
@@ -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
@@ -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,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
@@ -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) {}
@@ -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(),
@@ -1,4 +1,5 @@
annotation(retention = AnnotationRetention.RUNTIME) class First
@Retention(AnnotationRetention.RUNTIME)
annotation class First
class MyClass() {
public var x: String by Delegate()
@@ -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,
@@ -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,
@@ -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 {
@@ -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,
@@ -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
@@ -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