Serialize/deserialize annotations on type parameters

This commit is contained in:
Svetlana Isakova
2015-10-16 21:55:18 +03:00
parent b7e2604bf2
commit 25b40455ad
30 changed files with 397 additions and 131 deletions
@@ -0,0 +1,10 @@
// ALLOW_AST_ACCESS
package test
@Target(AnnotationTarget.TYPE_PARAMETER)
annotation class A
class SimpleTypeParameterAnnotation {
fun <@A T> foo(x: T) {}
}
@@ -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
}
@@ -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) {}
}
@@ -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
}