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,16 @@
// FILE: Outer.java
public abstract class Outer {
protected static class My {}
protected static class Your extends My {}
abstract protected Your foo(My my);
}
// FILE: OuterDerived.kt
class OuterDerived: Outer() {
// valid, My has better visibility
protected class His: Outer.My()
// valid, My and Your have better visibility
override fun foo(my: Outer.My) = Outer.Your()
}