Do not always generate synthetic "$annotations" as private
Since annotations are a part of the declaration, they must have the same visibility as the declaration in the bytecode. Otherwise obfuscators like Proguard might strip the "$annotations" method and no annotations would be found via Kotlin reflection #KT-15993 Fixed
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 static @AnnProperty @AnnFieldProperty @AnnParameterProperty method a$annotations(): void
|
||||
public synthetic deprecated static @AnnProperty @AnnFieldProperty @AnnParameterProperty method a$annotations(): void
|
||||
public final method getA(): int
|
||||
public final method getX(): int
|
||||
private synthetic deprecated static @AnnProperty @AnnFieldProperty method x$annotations(): void
|
||||
public synthetic deprecated static @AnnProperty @AnnFieldProperty method x$annotations(): void
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target
|
||||
@@ -56,4 +56,4 @@ public final class DefaultTargetsKt {
|
||||
private final static @Anno field p2: int
|
||||
static method <clinit>(): void
|
||||
public final static method getP2(): int
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user