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:
Alexander Udalov
2017-02-02 16:13:30 +03:00
parent 81e083a133
commit 0db60bf6cb
34 changed files with 166 additions and 60 deletions
@@ -9,6 +9,6 @@ public annotation class Simple {
public final class SimpleValAnnotationKt {
private final static field foo: int
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
private synthetic deprecated static @Simple method foo$annotations(): void
public synthetic deprecated static @Simple method foo$annotations(): void
public final static method getFoo(): int
}