FIR: Rewrite visibility checking

Unbound it from implicit receiver stack as it only needs scope structure/declaration nestedness
Semantics for protected has been changed in a way it works in old FE

NB: We should report additional diagnostic in case of CallCompanionProtectedNonStatic.fir.kt
(see KT-38814)
This commit is contained in:
Denis Zharkov
2020-05-06 16:10:32 +03:00
parent 825cdd3841
commit 687a58843f
9 changed files with 75 additions and 55 deletions
@@ -48,7 +48,7 @@ class Derived : Base() {
foo() // Ok
gav() // Ok
bar()
<!INAPPLICABLE_CANDIDATE!>baz<!>()
baz()
prop = 0
}
@@ -57,7 +57,7 @@ class Derived : Base() {
foo() // Ok
gav() // Ok
bar()
<!INAPPLICABLE_CANDIDATE!>baz<!>()
baz()
prop = 0
}
}
@@ -66,7 +66,7 @@ class Derived : Base() {
fun test2() {
gav() // Ok
bar()
<!INAPPLICABLE_CANDIDATE!>baz<!>()
baz()
prop = 0
}
}