Files
kotlin-fork/compiler/testData/diagnostics/tests/exposed/protectedJava.kt
T
Mikhail Glukhikh 0cc861f00b 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.
2015-10-07 20:15:16 +03:00

16 lines
404 B
Kotlin
Vendored

// 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()
}