Exposed visibility checking, a set of exposed visibility tests, some test fixes

Effective visibility mechanism introduced.
Local is considered as public, java protected as Kotlin protected, java package private as Kotlin private.
This commit is contained in:
Mikhail Glukhikh
2015-10-01 21:10:50 +03:00
committed by Mikhail Glukhikh
parent fa32aa2950
commit 0cc861f00b
73 changed files with 965 additions and 108 deletions
@@ -0,0 +1,20 @@
open class A {
// protected relative to A
protected open class B {
fun foo() {}
}
public open class C {
// protected relative to C, must be an error
protected open class D : <!EXPOSED_SUPER_CLASS!>B()<!>
}
}
class E : A.C() {
// F has invisible grandparent class B (E does not inherit from A)
class F : <!EXPOSED_SUPER_CLASS!>A.C.D()<!> {
init {
// Invoke function from invisible grandparent
foo()
}
}
}