mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Support loading Java annotations with TYPE_PARAMETER target
This commit is contained in:
14
compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java
vendored
Normal file
14
compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
public class TypeParameterAnnotations {
|
||||
@Target(ElementType.TYPE_PARAMETER)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@interface A {
|
||||
String value() default "";
|
||||
}
|
||||
|
||||
interface G<@A T> {
|
||||
<@A("abc") R> void foo(R r);
|
||||
}
|
||||
}
|
||||
14
compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.txt
vendored
Normal file
14
compiler/testData/loadJava8/sourceJava/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}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) public/*package*/ final annotation class A : kotlin.Annotation {
|
||||
public/*package*/ constructor A(/*0*/ value: kotlin.String = ...)
|
||||
public final val value: kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ interface G</*0*/ @test.TypeParameterAnnotations.A() T : kotlin.Any!> {
|
||||
public abstract fun </*0*/ @test.TypeParameterAnnotations.A(value = "abc") R : kotlin.Any!> foo(/*0*/ r: R!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user