Serialize/deserialize annotations on type parameters
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// ALLOW_AST_ACCESS
|
||||
|
||||
package test
|
||||
|
||||
@Target(AnnotationTarget.TYPE_PARAMETER)
|
||||
annotation class A
|
||||
|
||||
class SimpleTypeParameterAnnotation {
|
||||
fun <@A T> foo(x: T) {}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE_PARAMETER}) @kotlin.annotation.annotation() public final class A : kotlin.Annotation {
|
||||
/*primary*/ public constructor A()
|
||||
}
|
||||
|
||||
public final class SimpleTypeParameterAnnotation {
|
||||
/*primary*/ public constructor SimpleTypeParameterAnnotation()
|
||||
public final fun </*0*/ T> foo(/*0*/ x: T): kotlin.Unit
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// ALLOW_AST_ACCESS
|
||||
|
||||
package test
|
||||
|
||||
@Target(AnnotationTarget.TYPE_PARAMETER)
|
||||
annotation class A(val x: String, val y: Double)
|
||||
|
||||
class SimpleTypeParameterAnnotation {
|
||||
fun <@A("a", 1.0) T> foo(x: T) {}
|
||||
}
|
||||
compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.txt
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE_PARAMETER}) @kotlin.annotation.annotation() public final class A : kotlin.Annotation {
|
||||
/*primary*/ public constructor A(/*0*/ x: kotlin.String, /*1*/ y: kotlin.Double)
|
||||
public final val x: kotlin.String
|
||||
public final fun <get-x>(): kotlin.String
|
||||
public final val y: kotlin.Double
|
||||
public final fun <get-y>(): kotlin.Double
|
||||
}
|
||||
|
||||
public final class SimpleTypeParameterAnnotation {
|
||||
/*primary*/ public constructor SimpleTypeParameterAnnotation()
|
||||
public final fun </*0*/ T> foo(/*0*/ x: T): kotlin.Unit
|
||||
}
|
||||
Reference in New Issue
Block a user