mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
Support loading Java annotations with TYPE_PARAMETER target
This commit is contained in:
15
compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java
vendored
Normal file
15
compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package test;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
public class TypeParameterAnnotations {
|
||||
@Target(ElementType.TYPE_PARAMETER)
|
||||
public @interface A {
|
||||
String value() default "";
|
||||
}
|
||||
|
||||
// Currently annotations on type parameters and arguments are not loaded from compiled code because of IDEA-153093
|
||||
// Once it will be fixed check if KT-11454 is ready to be resolved
|
||||
public interface G<@A T> {
|
||||
<@A("abc") R> void foo(R r);
|
||||
}
|
||||
}
|
||||
14
compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.runtime.txt
vendored
Normal file
14
compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.runtime.txt
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
public open class TypeParameterAnnotations {
|
||||
public constructor TypeParameterAnnotations()
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE_PARAMETER}) @kotlin.annotation.Retention(value = ...) public final annotation class A : kotlin.Annotation {
|
||||
public final val value: kotlin.String
|
||||
public final fun <get-value>(): kotlin.String
|
||||
}
|
||||
|
||||
public interface G</*0*/ @test.TypeParameterAnnotations.A(value = "") T : kotlin.Any!> {
|
||||
public abstract fun </*0*/ @test.TypeParameterAnnotations.A(value = "abc") R : kotlin.Any!> foo(/*0*/ R!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
14
compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.txt
vendored
Normal file
14
compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.txt
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
public open class TypeParameterAnnotations {
|
||||
public constructor TypeParameterAnnotations()
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE_PARAMETER}) public final annotation class A : kotlin.Annotation {
|
||||
public constructor A(/*0*/ value: kotlin.String = ...)
|
||||
public final val value: kotlin.String
|
||||
}
|
||||
|
||||
public interface G</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun </*0*/ R : kotlin.Any!> foo(/*0*/ p0: R!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user