Generate interface property annotations in interface class (not in DefaultImpls)
This commit is contained in:
@@ -3,10 +3,10 @@ public final class A {
|
||||
private final @AnnField @AnnParameterField @AnnTypeField field a: int
|
||||
private final @AnnField @AnnTypeField field x: int
|
||||
public method <init>(@AnnParameterProperty @AnnParameterField p0: int): void
|
||||
private synthetic deprecated final static @AnnProperty @AnnFieldProperty @AnnParameterProperty method a$annotations(): void
|
||||
private synthetic deprecated static @AnnProperty @AnnFieldProperty @AnnParameterProperty method a$annotations(): void
|
||||
public final method getA(): int
|
||||
public final method getX(): int
|
||||
private synthetic deprecated final static @AnnProperty @AnnFieldProperty method x$annotations(): void
|
||||
private synthetic deprecated static @AnnProperty @AnnFieldProperty method x$annotations(): void
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target
|
||||
|
||||
@@ -11,11 +11,11 @@ public final class A {
|
||||
public final @org.jetbrains.annotations.NotNull method getS(): java.lang.String
|
||||
public final method getX(): int
|
||||
public final @AnnGetter method getY(): int
|
||||
private synthetic deprecated final static @AnnProp @AnnProp2 method p$annotations(): void
|
||||
private synthetic deprecated final static @AnnProp @AnnProp2 @AnnDelegate method s$annotations(): void
|
||||
private synthetic deprecated static @AnnProp @AnnProp2 method p$annotations(): void
|
||||
private synthetic deprecated static @AnnProp @AnnProp2 @AnnDelegate method s$annotations(): void
|
||||
public final @AnnSetter method setP(@AnnParam p0: int): void
|
||||
public final @AnnSetter method setY(p0: int): void
|
||||
private synthetic deprecated final static @AnnProp2 method x$annotations(): void
|
||||
private synthetic deprecated static @AnnProp2 method x$annotations(): void
|
||||
}
|
||||
|
||||
@java.lang.annotation.Retention
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_REFLECT
|
||||
|
||||
annotation class Property(val value: String)
|
||||
annotation class Accessor(val value: String)
|
||||
|
||||
interface Z {
|
||||
@Property("OK")
|
||||
val z: String;
|
||||
@Accessor("OK")
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
|
||||
class Test : Z
|
||||
|
||||
fun box() : String {
|
||||
val value = (Z::z.annotations.single() as Property).value
|
||||
if (value != "OK") return value
|
||||
return (Z::z.getter.annotations.single() as Accessor).value
|
||||
}
|
||||
Reference in New Issue
Block a user