Create additional constructor for java annotation with Class-parameter
One of them with KClass<*> parameters and other with java.lang.Class<*>. It's needed just for backward compatibility, and second one is deprecared.
This commit is contained in:
+2
-1
@@ -1,7 +1,8 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public constructor A(/*0*/ value: kotlin.String, /*1*/ b: kotlin.Double, /*2*/ x1: java.lang.Class<*>, /*3*/ a: kotlin.Int, /*4*/ x: java.lang.Class<*>, /*5*/ x2: java.lang.Class<*>)
|
||||
public /*synthesized*/ constructor A(/*0*/ value: kotlin.String, /*1*/ b: kotlin.Double, /*2*/ x1: java.lang.Class<*>, /*3*/ a: kotlin.Int, /*4*/ x: java.lang.Class<*>, /*5*/ x2: java.lang.Class<*>)
|
||||
public constructor A(/*0*/ value: kotlin.String, /*1*/ b: kotlin.Double, /*2*/ x1: kotlin.reflect.KClass<*>, /*3*/ a: kotlin.Int, /*4*/ x: kotlin.reflect.KClass<*>, /*5*/ x2: kotlin.reflect.KClass<*>)
|
||||
public abstract fun a(): kotlin.Int
|
||||
public abstract fun b(): kotlin.Double
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public constructor A(/*0*/ b: kotlin.Double, /*1*/ x1: java.lang.Class<*>, /*2*/ a: kotlin.Int, /*3*/ x: java.lang.Class<*>, /*4*/ x2: java.lang.Class<*>)
|
||||
public /*synthesized*/ constructor A(/*0*/ b: kotlin.Double, /*1*/ x1: java.lang.Class<*>, /*2*/ a: kotlin.Int, /*3*/ x: java.lang.Class<*>, /*4*/ x2: java.lang.Class<*>)
|
||||
public constructor A(/*0*/ b: kotlin.Double, /*1*/ x1: kotlin.reflect.KClass<*>, /*2*/ a: kotlin.Int, /*3*/ x: kotlin.reflect.KClass<*>, /*4*/ x2: kotlin.reflect.KClass<*>)
|
||||
public abstract fun a(): kotlin.Int
|
||||
public abstract fun b(): kotlin.Double
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+2
-1
@@ -10,7 +10,8 @@ A(value = {}: kotlin.Array<out kotlin.String>, y = IntegerValueType(7): IntegerV
|
||||
A(value = {"8", "9", "10"}: kotlin.Array<out kotlin.String>) internal fun test8(): kotlin.Unit
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public constructor A(/*0*/ vararg value: kotlin.String /*kotlin.Array<out kotlin.String>*/, /*1*/ x: java.lang.Class<*> = ..., /*2*/ y: kotlin.Int)
|
||||
public /*synthesized*/ constructor A(/*0*/ vararg value: kotlin.String /*kotlin.Array<out kotlin.String>*/, /*1*/ x: java.lang.Class<*> = ..., /*2*/ y: kotlin.Int)
|
||||
public constructor A(/*0*/ vararg value: kotlin.String /*kotlin.Array<out kotlin.String>*/, /*1*/ x: kotlin.reflect.KClass<*> = ..., /*2*/ y: kotlin.Int)
|
||||
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
|
||||
|
||||
+2
-2
@@ -22,6 +22,6 @@ public @interface A {
|
||||
|
||||
[A] fun test8() {}
|
||||
|
||||
[A(x = javaClass<Any>(), <!MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>*array("5", "6")<!>, <!MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>"7"<!>, y = 3)] fun test9() {}
|
||||
[A(x = javaClass<Any>(), value = *array("5", "6"), <!MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>"7"<!>, y = 3)] fun test10() {}
|
||||
[A(x = <!TYPE_MISMATCH(kotlin.reflect.KClass<*>; java.lang.Class<kotlin.Any>)!>javaClass<Any>()<!>, <!MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>*array("5", "6")<!>, <!MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>"7"<!>, y = 3)] fun test9() {}
|
||||
[A(x = <!TYPE_MISMATCH(kotlin.reflect.KClass<*>; java.lang.Class<kotlin.Any>)!>javaClass<Any>()<!>, value = *array("5", "6"), <!MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>"7"<!>, y = 3)] fun test10() {}
|
||||
[A(x = javaClass<Any>(), value = *array("5", "6", "7"), y = 3)] fun test11() {}
|
||||
|
||||
+2
-1
@@ -13,7 +13,8 @@ A(value = {}: kotlin.Array<out kotlin.String>) internal fun test8(): kotlin.Unit
|
||||
A(value = {}: kotlin.Array<out kotlin.String>, x = kotlin.Any.class: java.lang.Class<kotlin.Any>, y = IntegerValueType(3): IntegerValueType(3)) internal fun test9(): kotlin.Unit
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public constructor A(/*0*/ vararg value: kotlin.String /*kotlin.Array<out kotlin.String>*/, /*1*/ x: java.lang.Class<*> = ..., /*2*/ y: kotlin.Int = ...)
|
||||
public /*synthesized*/ constructor A(/*0*/ vararg value: kotlin.String /*kotlin.Array<out kotlin.String>*/, /*1*/ x: java.lang.Class<*> = ..., /*2*/ y: kotlin.Int = ...)
|
||||
public constructor A(/*0*/ vararg value: kotlin.String /*kotlin.Array<out kotlin.String>*/, /*1*/ x: kotlin.reflect.KClass<*> = ..., /*2*/ y: kotlin.Int = ...)
|
||||
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
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> arg() default Integer.class;
|
||||
int x() default 1;
|
||||
B b();
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
public @interface B {
|
||||
Class<?> arg() default String.class;
|
||||
int y() default 2;
|
||||
}
|
||||
|
||||
// FILE: c.kt
|
||||
A(arg = javaClass<String>(), b = B()) class MyClass1
|
||||
|
||||
A(b = B(y = 3)) class MyClass3
|
||||
|
||||
A(b = B(arg = javaClass<Double>())) class MyClass4
|
||||
|
||||
A(arg = javaClass<Boolean>(), b = B(arg = Char::class)) class MyClass5
|
||||
|
||||
A(arg = String::class, b = B(arg = javaClass<Boolean>())) class MyClass6
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*> = ..., /*1*/ x: kotlin.Int = ..., /*2*/ b: B)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*> = ..., /*1*/ x: kotlin.Int = ..., /*2*/ b: B)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
public abstract fun b(): B
|
||||
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
|
||||
public abstract fun x(): kotlin.Int
|
||||
}
|
||||
|
||||
public final annotation class B : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor B(/*0*/ arg: java.lang.Class<*> = ..., /*1*/ y: kotlin.Int = ...)
|
||||
public constructor B(/*0*/ arg: kotlin.reflect.KClass<*> = ..., /*1*/ y: kotlin.Int = ...)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
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
|
||||
public abstract fun y(): kotlin.Int
|
||||
}
|
||||
|
||||
A(arg = kotlin.String.class: java.lang.Class<kotlin.String>, b = B(): B) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(b = B(y = IntegerValueType(3): IntegerValueType(3)): B) internal final class MyClass3 {
|
||||
public constructor MyClass3()
|
||||
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
|
||||
}
|
||||
|
||||
A(b = B(arg = kotlin.Double.class: java.lang.Class<kotlin.Double>): B) internal final class MyClass4 {
|
||||
public constructor MyClass4()
|
||||
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
|
||||
}
|
||||
|
||||
A(arg = kotlin.Boolean.class: java.lang.Class<kotlin.Boolean>, b = B(arg = kotlin.Char::class: kotlin.reflect.KClass<kotlin.Char>): B) internal final class MyClass5 {
|
||||
public constructor MyClass5()
|
||||
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
|
||||
}
|
||||
|
||||
A(arg = kotlin.String::class: kotlin.reflect.KClass<kotlin.String>, b = B(arg = kotlin.Boolean.class: java.lang.Class<kotlin.Boolean>): B) internal final class MyClass6 {
|
||||
public constructor MyClass6()
|
||||
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
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> arg();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(arg = javaClass<String>()) class MyClass
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*>)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*>)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
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
|
||||
}
|
||||
|
||||
A(arg = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass {
|
||||
public constructor MyClass()
|
||||
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
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> arg();
|
||||
int x() default 1;
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(arg = javaClass<String>()) class MyClass1
|
||||
|
||||
A(arg = javaClass<String>(), x = 1) class MyClass2
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*>, /*1*/ x: kotlin.Int = ...)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*>, /*1*/ x: kotlin.Int = ...)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
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
|
||||
public abstract fun x(): kotlin.Int
|
||||
}
|
||||
|
||||
A(arg = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(arg = kotlin.String.class: java.lang.Class<kotlin.String>, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass2 {
|
||||
public constructor MyClass2()
|
||||
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
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?>[] arg();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
|
||||
A(arg = array(javaClass<String>(), javaClass<Int>())) class MyClass1
|
||||
|
||||
A(arg = <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>array<!>(javaClass<String>(), Int::class)) class MyClass2
|
||||
A(arg = <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>array<!>(String::class, javaClass<Int>())) class MyClass3
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: kotlin.Array<java.lang.Class<*>>)
|
||||
public constructor A(/*0*/ arg: kotlin.Array<kotlin.reflect.KClass<*>>)
|
||||
public abstract fun arg(): kotlin.Array<kotlin.reflect.KClass<*>>
|
||||
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
|
||||
}
|
||||
|
||||
A(arg = {kotlin.String.class, kotlin.Int.class}: kotlin.Array<java.lang.Class<*>>) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(arg = {kotlin.String.class, kotlin.Int::class}: kotlin.Array<???>) internal final class MyClass2 {
|
||||
public constructor MyClass2()
|
||||
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
|
||||
}
|
||||
|
||||
A(arg = {kotlin.String::class, kotlin.Int.class}: kotlin.Array<???>) internal final class MyClass3 {
|
||||
public constructor MyClass3()
|
||||
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
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> arg() default Integer.class;
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(arg = javaClass<String>()) class MyClass1
|
||||
A class MyClass3
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*> = ...)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*> = ...)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
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
|
||||
}
|
||||
|
||||
A(arg = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A() internal final class MyClass3 {
|
||||
public constructor MyClass3()
|
||||
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
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> arg() default Integer.class;
|
||||
int x();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(arg = javaClass<String>(), x = 3) class MyClass1
|
||||
A(x = 5) class MyClass2
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*> = ..., /*1*/ x: kotlin.Int)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*> = ..., /*1*/ x: kotlin.Int)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
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
|
||||
public abstract fun x(): kotlin.Int
|
||||
}
|
||||
|
||||
A(arg = kotlin.String.class: java.lang.Class<kotlin.String>, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(x = IntegerValueType(5): IntegerValueType(5)) internal final class MyClass2 {
|
||||
public constructor MyClass2()
|
||||
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
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> arg1();
|
||||
Class<?> arg2();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(arg1 = javaClass<String>(), arg2 = javaClass<Int>()) class MyClass1
|
||||
|
||||
A(arg1 = <!TYPE_MISMATCH!>javaClass<String>()<!>, arg2 = Int::class) class MyClass3
|
||||
A(arg1 = String::class, arg2 = <!TYPE_MISMATCH!>javaClass<Int>()<!>) class MyClass4
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg1: java.lang.Class<*>, /*1*/ arg2: java.lang.Class<*>)
|
||||
public constructor A(/*0*/ arg1: kotlin.reflect.KClass<*>, /*1*/ arg2: kotlin.reflect.KClass<*>)
|
||||
public abstract fun arg1(): kotlin.reflect.KClass<*>
|
||||
public abstract fun arg2(): kotlin.reflect.KClass<*>
|
||||
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
|
||||
}
|
||||
|
||||
A(arg1 = kotlin.String.class: java.lang.Class<kotlin.String>, arg2 = kotlin.Int.class: java.lang.Class<kotlin.Int>) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(arg1 = kotlin.String.class: java.lang.Class<kotlin.String>, arg2 = kotlin.Int::class: kotlin.reflect.KClass<kotlin.Int>) internal final class MyClass3 {
|
||||
public constructor MyClass3()
|
||||
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
|
||||
}
|
||||
|
||||
A(arg1 = kotlin.String::class: kotlin.reflect.KClass<kotlin.String>, arg2 = kotlin.Int.class: java.lang.Class<kotlin.Int>) internal final class MyClass4 {
|
||||
public constructor MyClass4()
|
||||
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
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> value();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(javaClass<String>()) class MyClass1
|
||||
A(value = javaClass<String>()) class MyClass2
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ value: java.lang.Class<*>)
|
||||
public constructor A(/*0*/ value: kotlin.reflect.KClass<*>)
|
||||
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
|
||||
public abstract fun value(): kotlin.reflect.KClass<*>
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass2 {
|
||||
public constructor MyClass2()
|
||||
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
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// !DIAGNOSTICS: -JAVA_LANG_CLASS_ARGUMENT_IN_ANNOTATION
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> value();
|
||||
int x() default 1;
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(javaClass<String>()) class MyClass1
|
||||
A(value = javaClass<String>()) class MyClass2
|
||||
|
||||
A(javaClass<String>(), x = 1) class MyClass3
|
||||
A(value = javaClass<String>(), x = 3) class MyClass4
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ value: java.lang.Class<*>, /*1*/ x: kotlin.Int = ...)
|
||||
public constructor A(/*0*/ value: kotlin.reflect.KClass<*>, /*1*/ x: kotlin.Int = ...)
|
||||
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
|
||||
public abstract fun value(): kotlin.reflect.KClass<*>
|
||||
public abstract fun x(): kotlin.Int
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass2 {
|
||||
public constructor MyClass2()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass3 {
|
||||
public constructor MyClass3()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass4 {
|
||||
public constructor MyClass4()
|
||||
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
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?>[] value();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(javaClass<String>(), javaClass<Int>()) class MyClass1
|
||||
|
||||
A(*array(javaClass<String>(), javaClass<Int>())) class MyClass2
|
||||
|
||||
A(value = *array(javaClass<String>(), javaClass<Int>())) class MyClass3
|
||||
|
||||
A(<!TYPE_MISMATCH!>javaClass<String>()<!>, Int::class) class MyClass4
|
||||
A(String::class, <!TYPE_MISMATCH!>javaClass<Int>()<!>) class MyClass5
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ vararg value: java.lang.Class<*> /*kotlin.Array<out java.lang.Class<*>>*/)
|
||||
public constructor A(/*0*/ vararg value: kotlin.reflect.KClass<*> /*kotlin.Array<out kotlin.reflect.KClass<*>>*/)
|
||||
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
|
||||
public abstract fun value(): kotlin.Array<kotlin.reflect.KClass<*>>
|
||||
}
|
||||
|
||||
A(value = {kotlin.String.class, kotlin.Int.class}: kotlin.Array<out java.lang.Class<*>>) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = {kotlin.String.class, kotlin.Int.class}: kotlin.Array<java.lang.Class<out kotlin.Comparable<out kotlin.Any?>>>) internal final class MyClass2 {
|
||||
public constructor MyClass2()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = {kotlin.String.class, kotlin.Int.class}: kotlin.Array<java.lang.Class<out kotlin.Comparable<out kotlin.Any?>>>) internal final class MyClass3 {
|
||||
public constructor MyClass3()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = {kotlin.String.class, kotlin.Int::class}: kotlin.Array<out kotlin.reflect.KClass<*>>) internal final class MyClass4 {
|
||||
public constructor MyClass4()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = {kotlin.String::class, kotlin.Int.class}: kotlin.Array<out kotlin.reflect.KClass<*>>) internal final class MyClass5 {
|
||||
public constructor MyClass5()
|
||||
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
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> value() default Integer.class;
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(javaClass<String>()) class MyClass1
|
||||
|
||||
A(value = javaClass<String>()) class MyClass2
|
||||
|
||||
A class MyClass3
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ value: java.lang.Class<*> = ...)
|
||||
public constructor A(/*0*/ value: kotlin.reflect.KClass<*> = ...)
|
||||
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
|
||||
public abstract fun value(): kotlin.reflect.KClass<*>
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>) internal final class MyClass2 {
|
||||
public constructor MyClass2()
|
||||
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
|
||||
}
|
||||
|
||||
A() internal final class MyClass3 {
|
||||
public constructor MyClass3()
|
||||
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
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// FILE: A.java
|
||||
public @interface A {
|
||||
Class<?> value() default Integer.class;
|
||||
int x();
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
A(javaClass<String>(), x = 1) class MyClass1
|
||||
A(value = javaClass<String>(), x = 3) class MyClass2
|
||||
A(x = 5) class MyClass3
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ value: java.lang.Class<*> = ..., /*1*/ x: kotlin.Int)
|
||||
public constructor A(/*0*/ value: kotlin.reflect.KClass<*> = ..., /*1*/ x: kotlin.Int)
|
||||
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
|
||||
public abstract fun value(): kotlin.reflect.KClass<*>
|
||||
public abstract fun x(): kotlin.Int
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass1 {
|
||||
public constructor MyClass1()
|
||||
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
|
||||
}
|
||||
|
||||
A(value = kotlin.String.class: java.lang.Class<kotlin.String>, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass2 {
|
||||
public constructor MyClass2()
|
||||
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
|
||||
}
|
||||
|
||||
A(x = IntegerValueType(5): IntegerValueType(5)) internal final class MyClass3 {
|
||||
public constructor MyClass3()
|
||||
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
|
||||
}
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*> = ..., /*1*/ x: kotlin.Int = ..., /*2*/ b: B)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*> = ..., /*1*/ x: kotlin.Int = ..., /*2*/ b: B)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
public abstract fun b(): B
|
||||
@@ -11,6 +12,7 @@ public final annotation class A : kotlin.Annotation {
|
||||
}
|
||||
|
||||
public final annotation class B : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor B(/*0*/ arg: java.lang.Class<*> = ..., /*1*/ y: kotlin.Int = ...)
|
||||
public constructor B(/*0*/ arg: kotlin.reflect.KClass<*> = ..., /*1*/ y: kotlin.Int = ...)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*>)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*>)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*>, /*1*/ x: kotlin.Int = ...)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*>, /*1*/ x: kotlin.Int = ...)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: kotlin.Array<java.lang.Class<*>>)
|
||||
public constructor A(/*0*/ arg: kotlin.Array<kotlin.reflect.KClass<*>>)
|
||||
public abstract fun arg(): kotlin.Array<kotlin.reflect.KClass<*>>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*> = ...)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*> = ...)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg: java.lang.Class<*> = ..., /*1*/ x: kotlin.Int)
|
||||
public constructor A(/*0*/ arg: kotlin.reflect.KClass<*> = ..., /*1*/ x: kotlin.Int)
|
||||
public abstract fun arg(): kotlin.reflect.KClass<*>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ arg1: java.lang.Class<*>, /*1*/ arg2: java.lang.Class<*>)
|
||||
public constructor A(/*0*/ arg1: kotlin.reflect.KClass<*>, /*1*/ arg2: kotlin.reflect.KClass<*>)
|
||||
public abstract fun arg1(): kotlin.reflect.KClass<*>
|
||||
public abstract fun arg2(): kotlin.reflect.KClass<*>
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ value: java.lang.Class<*>)
|
||||
public constructor A(/*0*/ value: kotlin.reflect.KClass<*>)
|
||||
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
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ value: java.lang.Class<*>, /*1*/ x: kotlin.Int = ...)
|
||||
public constructor A(/*0*/ value: kotlin.reflect.KClass<*>, /*1*/ x: kotlin.Int = ...)
|
||||
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
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ vararg value: java.lang.Class<*> /*kotlin.Array<out java.lang.Class<*>>*/)
|
||||
public constructor A(/*0*/ vararg value: kotlin.reflect.KClass<*> /*kotlin.Array<out kotlin.reflect.KClass<*>>*/)
|
||||
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
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ value: java.lang.Class<*> = ...)
|
||||
public constructor A(/*0*/ value: kotlin.reflect.KClass<*> = ...)
|
||||
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
@@ -1,6 +1,7 @@
|
||||
package
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor A(/*0*/ value: java.lang.Class<*> = ..., /*1*/ x: kotlin.Int)
|
||||
public constructor A(/*0*/ value: kotlin.reflect.KClass<*> = ..., /*1*/ x: kotlin.Int)
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -4,6 +4,7 @@ public open class ClassObjectArrayInParam {
|
||||
public constructor ClassObjectArrayInParam()
|
||||
|
||||
public final annotation class Anno : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor Anno(/*0*/ vararg value: java.lang.Class<*> /*kotlin.Array<out java.lang.Class<*>>*/)
|
||||
public constructor Anno(/*0*/ vararg value: kotlin.reflect.KClass<*> /*kotlin.Array<out kotlin.reflect.KClass<*>>*/)
|
||||
public abstract fun value(): kotlin.Array<kotlin.reflect.KClass<*>>
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ public open class ClassObjectInParam {
|
||||
public constructor ClassObjectInParam()
|
||||
|
||||
public final annotation class Anno : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor Anno(/*0*/ value: java.lang.Class<*>)
|
||||
public constructor Anno(/*0*/ value: kotlin.reflect.KClass<*>)
|
||||
public abstract fun value(): kotlin.reflect.KClass<*>
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ public open class ClassObjectInParamRaw {
|
||||
public constructor ClassObjectInParamRaw()
|
||||
|
||||
public final annotation class Anno : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor Anno(/*0*/ value: java.lang.Class<*>, /*1*/ arg: kotlin.Array<java.lang.Class<*>>)
|
||||
public constructor Anno(/*0*/ value: kotlin.reflect.KClass<*>, /*1*/ arg: kotlin.Array<kotlin.reflect.KClass<*>>)
|
||||
public abstract fun arg(): kotlin.Array<kotlin.reflect.KClass<*>>
|
||||
public abstract fun value(): kotlin.reflect.KClass<*>
|
||||
|
||||
@@ -4,6 +4,7 @@ public open class ClassObjectInParamVariance {
|
||||
public constructor ClassObjectInParamVariance()
|
||||
|
||||
public final annotation class Anno : kotlin.Annotation {
|
||||
public /*synthesized*/ constructor Anno(/*0*/ arg1: java.lang.Class<out kotlin.Int!>, /*1*/ arg2: java.lang.Class<in kotlin.Int!>, /*2*/ arg3: kotlin.Array<java.lang.Class<out kotlin.Int!>>, /*3*/ arg4: kotlin.Array<java.lang.Class<in kotlin.Int!>>, /*4*/ arg5: kotlin.Array<java.lang.Class<out java.lang.Class<*>!>>, /*5*/ arg6: kotlin.Array<java.lang.Class<in java.lang.Class<*>!>>, /*6*/ arg7: kotlin.Array<java.lang.Class<out java.lang.Class<kotlin.Int!>!>>, /*7*/ arg8: kotlin.Array<java.lang.Class<in java.lang.Class<kotlin.Int!>!>>)
|
||||
public constructor Anno(/*0*/ arg1: kotlin.reflect.KClass<out kotlin.Int!>, /*1*/ arg2: kotlin.reflect.KClass<in kotlin.Int!>, /*2*/ arg3: kotlin.Array<kotlin.reflect.KClass<out kotlin.Int!>>, /*3*/ arg4: kotlin.Array<kotlin.reflect.KClass<in kotlin.Int!>>, /*4*/ arg5: kotlin.Array<kotlin.reflect.KClass<out java.lang.Class<*>!>>, /*5*/ arg6: kotlin.Array<kotlin.reflect.KClass<in java.lang.Class<*>!>>, /*6*/ arg7: kotlin.Array<kotlin.reflect.KClass<out java.lang.Class<kotlin.Int!>!>>, /*7*/ arg8: kotlin.Array<kotlin.reflect.KClass<in java.lang.Class<kotlin.Int!>!>>)
|
||||
public abstract fun arg1(): kotlin.reflect.KClass<out kotlin.Int!>
|
||||
public abstract fun arg2(): kotlin.reflect.KClass<in kotlin.Int!>
|
||||
|
||||
+81
@@ -175,6 +175,87 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class AnnotationsWithJavaLangClassParameterOverload extends AbstractJetDiagnosticsTestWithStdLib {
|
||||
public void testAllFilesPresentInAnnotationsWithJavaLangClassParameterOverload() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationAsArgument.kt")
|
||||
public void testAnnotationAsArgument() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/annotationAsArgument.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("arg.kt")
|
||||
public void testArg() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/arg.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("argAndOtherDefault.kt")
|
||||
public void testArgAndOtherDefault() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argAndOtherDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("argArray.kt")
|
||||
public void testArgArray() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argArray.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("argWithDefault.kt")
|
||||
public void testArgWithDefault() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("argWithDefaultAndOther.kt")
|
||||
public void testArgWithDefaultAndOther() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefaultAndOther.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("twoArgs.kt")
|
||||
public void testTwoArgs() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/twoArgs.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("value.kt")
|
||||
public void testValue() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/value.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("valueAndOtherDefault.kt")
|
||||
public void testValueAndOtherDefault() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueAndOtherDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("valueArray.kt")
|
||||
public void testValueArray() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueArray.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("valueWithDefault.kt")
|
||||
public void testValueWithDefault() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("valueWithDefaultAndOther.kt")
|
||||
public void testValueWithDefaultAndOther() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefaultAndOther.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
-1
@@ -78,7 +78,6 @@ public final class DescriptorResolverUtils {
|
||||
@Nullable
|
||||
public static ValueParameterDescriptor getAnnotationParameterByName(@NotNull Name name, @NotNull ClassDescriptor annotationClass) {
|
||||
Collection<ConstructorDescriptor> constructors = annotationClass.getConstructors();
|
||||
assert constructors.size() == 1 : "Annotation class descriptor must have only one constructor";
|
||||
|
||||
for (ValueParameterDescriptor parameter : constructors.iterator().next().getValueParameters()) {
|
||||
if (parameter.getName().equals(name)) {
|
||||
|
||||
+4
-6
@@ -18,10 +18,7 @@ package org.jetbrains.kotlin.load.java.descriptors;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.SourceElement;
|
||||
import org.jetbrains.kotlin.descriptors.*;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
|
||||
import org.jetbrains.kotlin.descriptors.impl.ConstructorDescriptorImpl;
|
||||
|
||||
@@ -45,9 +42,10 @@ public class JavaConstructorDescriptor extends ConstructorDescriptorImpl impleme
|
||||
@NotNull ClassDescriptor containingDeclaration,
|
||||
@NotNull Annotations annotations,
|
||||
boolean isPrimary,
|
||||
@NotNull SourceElement source
|
||||
@NotNull SourceElement source,
|
||||
Kind kind
|
||||
) {
|
||||
return new JavaConstructorDescriptor(containingDeclaration, null, annotations, isPrimary, Kind.DECLARATION, source);
|
||||
return new JavaConstructorDescriptor(containingDeclaration, null, annotations, isPrimary, kind, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+37
-10
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.java.lazy.descriptors
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.load.java.structure.*
|
||||
@@ -62,7 +63,7 @@ public class LazyJavaClassMemberScope(
|
||||
result.add(descriptor)
|
||||
result.addIfNotNull(c.samConversionResolver.resolveSamAdapter(descriptor))
|
||||
}
|
||||
result ifEmpty { emptyOrSingletonList(createDefaultConstructor()) }
|
||||
result ifEmpty { createDefaultConstructors() }
|
||||
}
|
||||
|
||||
override fun computeNonDeclaredFunctions(result: MutableCollection<SimpleFunctionDescriptor>, name: Name) {
|
||||
@@ -108,7 +109,8 @@ public class LazyJavaClassMemberScope(
|
||||
val classDescriptor = getContainingDeclaration()
|
||||
|
||||
val constructorDescriptor = JavaConstructorDescriptor.createJavaConstructor(
|
||||
classDescriptor, c.resolveAnnotations(constructor), /* isPrimary = */ false, c.sourceElementFactory.source(constructor)
|
||||
classDescriptor, c.resolveAnnotations(constructor), false, c.sourceElementFactory.source(constructor),
|
||||
CallableMemberDescriptor.Kind.DECLARATION
|
||||
)
|
||||
|
||||
val valueParameters = resolveValueParameters(c, constructorDescriptor, constructor.getValueParameters())
|
||||
@@ -135,24 +137,45 @@ public class LazyJavaClassMemberScope(
|
||||
return constructorDescriptor
|
||||
}
|
||||
|
||||
private fun createDefaultConstructor(): ConstructorDescriptor? {
|
||||
val isAnnotation: Boolean = jClass.isAnnotationType()
|
||||
private fun createDefaultConstructors(): List<ConstructorDescriptor> {
|
||||
val isAnnotation = jClass.isAnnotationType()
|
||||
if (jClass.isInterface() && !isAnnotation)
|
||||
return null
|
||||
return emptyList()
|
||||
|
||||
val defaultConstructor = createDefaultConstructor(true)
|
||||
|
||||
val additionalConstructor =
|
||||
if (isAnnotation && defaultConstructor.getValueParameters().any { it.getType().isKClassOrArray() })
|
||||
createDefaultConstructor(false)
|
||||
else null
|
||||
|
||||
return listOf(defaultConstructor) + additionalConstructor.singletonOrEmptyList()
|
||||
}
|
||||
|
||||
private fun JetType.isKClassOrArray() = isKClass() || (KotlinBuiltIns.isArray(this) && getArguments().first().getType().isKClass())
|
||||
private fun JetType.isKClass() =
|
||||
(getConstructor().getDeclarationDescriptor() as? ClassDescriptor)?.let { KotlinBuiltIns.isKClass(it) } ?: false
|
||||
|
||||
private fun createDefaultConstructor(isPrimary: Boolean): JavaConstructorDescriptor {
|
||||
val isAnnotation = jClass.isAnnotationType()
|
||||
|
||||
val classDescriptor = getContainingDeclaration()
|
||||
val constructorDescriptor = JavaConstructorDescriptor.createJavaConstructor(
|
||||
classDescriptor, Annotations.EMPTY, /* isPrimary = */ true, c.sourceElementFactory.source(jClass)
|
||||
classDescriptor, Annotations.EMPTY, isPrimary, c.sourceElementFactory.source(jClass),
|
||||
if (isPrimary) CallableMemberDescriptor.Kind.DECLARATION else CallableMemberDescriptor.Kind.SYNTHESIZED
|
||||
)
|
||||
val typeParameters = classDescriptor.getTypeConstructor().getParameters()
|
||||
val valueParameters = if (isAnnotation) createAnnotationConstructorParameters(constructorDescriptor)
|
||||
val valueParameters = if (isAnnotation) createAnnotationConstructorParameters(constructorDescriptor, isPrimary)
|
||||
else Collections.emptyList<ValueParameterDescriptor>()
|
||||
|
||||
constructorDescriptor.setHasSynthesizedParameterNames(false)
|
||||
|
||||
constructorDescriptor.initialize(typeParameters, valueParameters, getConstructorVisibility(classDescriptor))
|
||||
constructorDescriptor.setHasStableParameterNames(true)
|
||||
constructorDescriptor.setReturnType(classDescriptor.getDefaultType())
|
||||
c.javaResolverCache.recordConstructor(jClass, constructorDescriptor);
|
||||
if (isPrimary) {
|
||||
c.javaResolverCache.recordConstructor(jClass, constructorDescriptor)
|
||||
}
|
||||
return constructorDescriptor
|
||||
}
|
||||
|
||||
@@ -164,11 +187,15 @@ public class LazyJavaClassMemberScope(
|
||||
return visibility
|
||||
}
|
||||
|
||||
private fun createAnnotationConstructorParameters(constructor: ConstructorDescriptorImpl): List<ValueParameterDescriptor> {
|
||||
private fun createAnnotationConstructorParameters(
|
||||
constructor: ConstructorDescriptorImpl,
|
||||
loadJavaClassAsKClass: Boolean
|
||||
): List<ValueParameterDescriptor> {
|
||||
val methods = jClass.getMethods()
|
||||
val result = ArrayList<ValueParameterDescriptor>(methods.size())
|
||||
|
||||
val attr = TypeUsage.MEMBER_SIGNATURE_INVARIANT.toAttributes(allowFlexible = false, isForAnnotationParameter = true)
|
||||
val attr = TypeUsage.MEMBER_SIGNATURE_INVARIANT.toAttributes(
|
||||
allowFlexible = false, isForAnnotationParameter = loadJavaClassAsKClass)
|
||||
|
||||
val (methodsNamedValue, otherMethods) = methods.
|
||||
partition { it.getName() == JvmAnnotationNames.DEFAULT_ANNOTATION_MEMBER_NAME }
|
||||
|
||||
Reference in New Issue
Block a user