[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
annotation class A
|
||||
annotation class A1(val x: Int)
|
||||
|
||||
annotation class B(
|
||||
val a: A = A(),
|
||||
val x: Int = A1(42).x,
|
||||
val aa: Array<A> = arrayOf(A())
|
||||
)
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation class Ann(
|
||||
val a: Array<String> = arrayOf(readOnly),
|
||||
val b: Array<String> = arrayOf(withGetter),
|
||||
val c: Array<String> = arrayOf(func()),
|
||||
val d: IntArray = intArrayOf(ONE, twoWithGetter),
|
||||
val e: IntArray = intArrayOf(ONE + twoWithGetter),
|
||||
val f: Array<String> = arrayOf(mutable),
|
||||
val g: Array<String> = arrayOf(mutableWithGetter),
|
||||
val h: Array<KClass<*>> = arrayOf(WithLateinit.kClass)
|
||||
)
|
||||
|
||||
const val ONE = 1
|
||||
|
||||
val twoWithGetter
|
||||
get() = 2
|
||||
|
||||
val readOnly = ""
|
||||
|
||||
val withGetter
|
||||
get() = ""
|
||||
|
||||
fun func() = ""
|
||||
|
||||
var mutable = ""
|
||||
|
||||
var mutableWithGetter
|
||||
get() = ""
|
||||
set(x) = TODO()
|
||||
|
||||
object WithLateinit {
|
||||
lateinit var kClass: KClass<*>
|
||||
}
|
||||
compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithValue.fir.kt
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
double b();
|
||||
Class<?> x1();
|
||||
int a();
|
||||
String value();
|
||||
Class<?> x();
|
||||
Class<?> x2();
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
double b();
|
||||
Class<?> x1();
|
||||
int a();
|
||||
Class<?> x();
|
||||
Class<?> x2();
|
||||
}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
String[] value();
|
||||
Class<?> x() default Integer.class;
|
||||
int y();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
@A("1", "2", "3", y = 1) fun test1() {}
|
||||
|
||||
@A("4", y = 2) fun test2() {}
|
||||
|
||||
@A(*arrayOf("5", "6"), "7", y = 3) fun test3() {}
|
||||
|
||||
@A("1", "2", "3", x = String::class, y = 4) fun test4() {}
|
||||
|
||||
@A("4", y = 5) fun test5() {}
|
||||
|
||||
@A(*arrayOf("5", "6"), "7", x = Any::class, y = 6) fun test6() {}
|
||||
|
||||
@A(y = 7) fun test7() {}
|
||||
|
||||
@A("8", "9", "10") fun test8() {}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
String[] value();
|
||||
Class<?> x() default Integer.class;
|
||||
int y() default 1;
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
@A("1", "2", "3") fun test1() {}
|
||||
|
||||
@A("4") fun test2() {}
|
||||
|
||||
@A(*arrayOf("5", "6"), "7") fun test3() {}
|
||||
|
||||
@A("1", "2", "3", x = String::class) fun test4() {}
|
||||
|
||||
@A("4", y = 2) fun test5() {}
|
||||
|
||||
@A(*arrayOf("5", "6"), "7", x = Any::class, y = 3) fun test6() {}
|
||||
|
||||
@A() fun test7() {}
|
||||
|
||||
@A fun test8() {}
|
||||
|
||||
@A(x = Any::class, *arrayOf("5", "6"), "7", y = 3) fun test9() {}
|
||||
@A(x = Any::class, value = ["5", "6"], "7", y = 3) fun test10() {}
|
||||
@A(x = Any::class, value = ["5", "6", "7"], y = 3) fun test11() {}
|
||||
compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.fir.kt
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
String[] value();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
@A("1", "2", "3") fun test1() {}
|
||||
|
||||
@A("4") fun test2() {}
|
||||
|
||||
@A(*arrayOf("5", "6"), "7") fun test3() {}
|
||||
|
||||
@A() fun test4() {}
|
||||
|
||||
@A fun test5() {}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
String[] value() default {"abc", "cde"};
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
@A("1", "2", "3") fun test1() {}
|
||||
|
||||
@A("4") fun test2() {}
|
||||
|
||||
@A(*arrayOf("5", "6"), "7") fun test3() {}
|
||||
|
||||
@A() fun test4() {}
|
||||
|
||||
@A fun test5() {}
|
||||
Reference in New Issue
Block a user