Make vararg argument of java annotation have 'out' type

This commit is contained in:
Svetlana Isakova
2014-12-25 17:13:57 +03:00
parent d1556331ef
commit d2becce1ac
15 changed files with 94 additions and 46 deletions
@@ -7381,7 +7381,7 @@ package java {
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Deprecated : kotlin.Annotation {
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Deprecated : kotlin.Annotation {
public constructor Deprecated()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -7870,7 +7870,7 @@ package java {
private open fun registerNatives(): kotlin.Unit
}
java.lang.annotation.Target(value = {ElementType.METHOD}: kotlin.Array<java.lang.annotation.ElementType>) java.lang.annotation.Retention(value = RetentionPolicy.SOURCE: java.lang.annotation.RetentionPolicy) public final annotation class Override : kotlin.Annotation {
java.lang.annotation.Target(value = {ElementType.METHOD}: kotlin.Array<out java.lang.annotation.ElementType>) java.lang.annotation.Retention(value = RetentionPolicy.SOURCE: java.lang.annotation.RetentionPolicy) public final annotation class Override : kotlin.Annotation {
public constructor Override()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -8202,8 +8202,8 @@ package java {
public/*package*/ final val serialVersionUID: kotlin.Long = 4383685877147921099.toLong()
}
java.lang.annotation.Target(value = {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE}: kotlin.Array<java.lang.annotation.ElementType>) java.lang.annotation.Retention(value = RetentionPolicy.SOURCE: java.lang.annotation.RetentionPolicy) public final annotation class SuppressWarnings : kotlin.Annotation {
public constructor SuppressWarnings(/*0*/ vararg value: kotlin.String /*kotlin.Array<kotlin.String>*/)
java.lang.annotation.Target(value = {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE}: kotlin.Array<out java.lang.annotation.ElementType>) java.lang.annotation.Retention(value = RetentionPolicy.SOURCE: java.lang.annotation.RetentionPolicy) public final annotation class SuppressWarnings : kotlin.Annotation {
public constructor SuppressWarnings(/*0*/ vararg value: kotlin.String /*kotlin.Array<out kotlin.String>*/)
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
@@ -8747,7 +8747,7 @@ package java {
private final val serialVersionUID: kotlin.Long = 8125925355765570191.toLong()
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Documented : kotlin.Annotation {
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Documented : kotlin.Annotation {
public constructor Documented()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -8945,14 +8945,14 @@ package java {
private final val serialVersionUID: kotlin.Long = 8445097402741811912.toLong()
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Inherited : kotlin.Annotation {
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Inherited : kotlin.Annotation {
public constructor Inherited()
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
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Retention : kotlin.Annotation {
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Retention : kotlin.Annotation {
public constructor Retention(/*0*/ value: java.lang.annotation.RetentionPolicy)
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -9034,8 +9034,8 @@ package java {
public final /*synthesized*/ fun values(): kotlin.Array<java.lang.annotation.RetentionPolicy>
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Target : kotlin.Annotation {
public constructor Target(/*0*/ vararg value: java.lang.annotation.ElementType /*kotlin.Array<java.lang.annotation.ElementType>*/)
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Target : kotlin.Annotation {
public constructor Target(/*0*/ vararg value: java.lang.annotation.ElementType /*kotlin.Array<out java.lang.annotation.ElementType>*/)
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
@@ -7386,7 +7386,7 @@ package java {
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Deprecated : kotlin.Annotation {
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Deprecated : kotlin.Annotation {
public constructor Deprecated()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -7875,7 +7875,7 @@ package java {
private open fun registerNatives(): kotlin.Unit
}
java.lang.annotation.Target(value = {ElementType.METHOD}: kotlin.Array<java.lang.annotation.ElementType>) java.lang.annotation.Retention(value = RetentionPolicy.SOURCE: java.lang.annotation.RetentionPolicy) public final annotation class Override : kotlin.Annotation {
java.lang.annotation.Target(value = {ElementType.METHOD}: kotlin.Array<out java.lang.annotation.ElementType>) java.lang.annotation.Retention(value = RetentionPolicy.SOURCE: java.lang.annotation.RetentionPolicy) public final annotation class Override : kotlin.Annotation {
public constructor Override()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -8207,8 +8207,8 @@ package java {
public/*package*/ final val serialVersionUID: kotlin.Long = 4383685877147921099.toLong()
}
java.lang.annotation.Target(value = {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE}: kotlin.Array<java.lang.annotation.ElementType>) java.lang.annotation.Retention(value = RetentionPolicy.SOURCE: java.lang.annotation.RetentionPolicy) public final annotation class SuppressWarnings : kotlin.Annotation {
public constructor SuppressWarnings(/*0*/ vararg value: kotlin.String /*kotlin.Array<kotlin.String>*/)
java.lang.annotation.Target(value = {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE}: kotlin.Array<out java.lang.annotation.ElementType>) java.lang.annotation.Retention(value = RetentionPolicy.SOURCE: java.lang.annotation.RetentionPolicy) public final annotation class SuppressWarnings : kotlin.Annotation {
public constructor SuppressWarnings(/*0*/ vararg value: kotlin.String /*kotlin.Array<out kotlin.String>*/)
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
@@ -8752,7 +8752,7 @@ package java {
private final val serialVersionUID: kotlin.Long = 8125925355765570191.toLong()
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Documented : kotlin.Annotation {
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Documented : kotlin.Annotation {
public constructor Documented()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -8950,14 +8950,14 @@ package java {
private final val serialVersionUID: kotlin.Long = 8445097402741811912.toLong()
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Inherited : kotlin.Annotation {
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Inherited : kotlin.Annotation {
public constructor Inherited()
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
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Retention : kotlin.Annotation {
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Retention : kotlin.Annotation {
public constructor Retention(/*0*/ value: java.lang.annotation.RetentionPolicy)
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -9039,8 +9039,8 @@ package java {
public final /*synthesized*/ fun values(): kotlin.Array<java.lang.annotation.RetentionPolicy>
}
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<java.lang.annotation.ElementType>) public final annotation class Target : kotlin.Annotation {
public constructor Target(/*0*/ vararg value: java.lang.annotation.ElementType /*kotlin.Array<java.lang.annotation.ElementType>*/)
java.lang.annotation.Documented() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE}: kotlin.Array<out java.lang.annotation.ElementType>) public final annotation class Target : kotlin.Annotation {
public constructor Target(/*0*/ vararg value: java.lang.annotation.ElementType /*kotlin.Array<out java.lang.annotation.ElementType>*/)
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
@@ -0,0 +1,9 @@
// FILE: A.java
public @interface A {
String[] arg();
}
// FILE: b.kt
[A(*<!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH(kotlin.Array<out kotlin.String>; IGNORE)!>array<!>(1, "b"))]
fun test() {
}
@@ -0,0 +1,11 @@
package
A(arg = {IntegerValueType(1), "b"}: kotlin.Array<???>) internal fun test(): kotlin.Unit
public final annotation class A : kotlin.Annotation {
public constructor A(/*0*/ vararg arg: kotlin.String /*kotlin.Array<out kotlin.String>*/)
public abstract fun arg(): kotlin.Array<kotlin.String>
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
}
@@ -0,0 +1,5 @@
annotation class B(vararg val args: String)
[B(*<!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH(kotlin.Array<out kotlin.String>; IGNORE)!>array<!>(1, "b"))]
fun test() {
}
@@ -0,0 +1,11 @@
package
B(args = {IntegerValueType(1), "b"}: kotlin.Array<???>) internal fun test(): kotlin.Unit
internal final annotation class B : kotlin.Annotation {
public constructor B(/*0*/ vararg args: kotlin.String /*kotlin.Array<out kotlin.String>*/)
internal final val args: kotlin.Array<out kotlin.String>
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
}