FIR: rename HIDDEN to INVISIBLE_REFERENCE

Some of them should be INVISIBLE_MEMBER though
This commit is contained in:
pyos
2021-04-19 10:14:16 +02:00
committed by Mikhail Glukhikh
parent f1cf6b54e7
commit e6d923f65c
139 changed files with 284 additions and 468 deletions
@@ -8,6 +8,6 @@ class Foo : BaseClass() {
fun bar() {
val f = foo()
f.x
f.<!HIDDEN!>y<!>
f.<!INVISIBLE_REFERENCE!>y<!>
}
}
@@ -39,20 +39,20 @@ class KotlinClass2 : JavaClass() {
}
fun test(a: KotlinClass, b: KotlinClass2) {
a.<!HIDDEN!>foo<!>() // Error, protected_and_package declared in different package
b.<!HIDDEN!>foo<!>() // Error, protected visibility in same package (but could be protected_and_package)
a.<!INVISIBLE_REFERENCE!>foo<!>() // Error, protected_and_package declared in different package
b.<!INVISIBLE_REFERENCE!>foo<!>() // Error, protected visibility in same package (but could be protected_and_package)
a.<!HIDDEN!>field<!>
a.<!INVISIBLE_REFERENCE!>field<!>
JavaClass.<!HIDDEN!>bar1<!>()
JavaClass.<!HIDDEN!>CONST1<!>
JavaClass.<!INVISIBLE_REFERENCE!>bar1<!>()
JavaClass.<!INVISIBLE_REFERENCE!>CONST1<!>
KotlinClass.<!UNRESOLVED_REFERENCE!>bar1<!>() // Currently it's unresolved, but it should be prohibited even in case it would be resolved
KotlinClass.<!UNRESOLVED_REFERENCE!>CONST1<!>
JavaClassSamePackage.<!HIDDEN!>bar1<!>()
JavaClassSamePackage.<!INVISIBLE_REFERENCE!>bar1<!>()
JavaClassSamePackage.bar2()
JavaClassSamePackage.<!HIDDEN!>CONST1<!>
JavaClassSamePackage.<!INVISIBLE_REFERENCE!>CONST1<!>
JavaClassSamePackage.CONST2
}
@@ -4,8 +4,8 @@ open class A {
fun bar(x: B) {
x.foo() // OK, foo declared in A
x.<!HIDDEN!>baz<!>() // Declared in B
x.<!HIDDEN!>foobaz<!>() // Declared in B
x.<!INVISIBLE_REFERENCE!>baz<!>() // Declared in B
x.<!INVISIBLE_REFERENCE!>foobaz<!>() // Declared in B
}
}
@@ -40,6 +40,6 @@ class B : A() {
}
fun baz(a: A) {
a.<!HIDDEN!>foo<!>
a.<!INVISIBLE_REFERENCE!>foo<!>
a.bar = a.bar + ""
}
@@ -27,5 +27,5 @@ class B : A() {
}
fun baz(a: A) {
a.<!HIDDEN!>foo<!> { }
a.<!INVISIBLE_REFERENCE!>foo<!> { }
}