Files
kotlin-fork/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/protectedProperty.kt
T
Alexander Udalov 0db60bf6cb 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
2017-02-03 19:35:15 +03:00

11 lines
225 B
Kotlin
Vendored

open class Foo {
annotation class Anno
@Anno
protected val prop = 42
}
// TESTED_OBJECT_KIND: function
// TESTED_OBJECTS: Foo, prop$annotations
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PROTECTED