Fixed visibility checks for annotation usage on top-level declarations

#KT-12429 Fixed
This commit is contained in:
Stanislav Erokhin
2016-05-20 12:07:02 +03:00
parent a42b8d56b4
commit db64d9c528
6 changed files with 108 additions and 7 deletions
@@ -0,0 +1,27 @@
// FILE: 1.kt
package pp
private annotation class A(val s: String)
private const val foo = "O"
@A(foo)
fun f1() {}
@A(foo)
val p1 = ""
@A(foo)
class C1
// FILE: 2.kt
package pp
@<!INVISIBLE_REFERENCE, INVISIBLE_MEMBER!>A<!>(<!INVISIBLE_MEMBER!>foo<!>)
fun f2() {}
@<!INVISIBLE_REFERENCE, INVISIBLE_MEMBER!>A<!>(<!INVISIBLE_MEMBER!>foo<!>)
val p2 = ""
@<!INVISIBLE_REFERENCE, INVISIBLE_MEMBER!>A<!>(<!INVISIBLE_MEMBER!>foo<!>)
class C2