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
@@ -7,8 +7,8 @@ open class Foo {
}
class Bar: Foo() {
fun foo(): Nested? = null
protected fun foo(): Nested? = null
}
fun foo(): <!INVISIBLE_REFERENCE!>Nested<!>? = null
fun bar(): p.Foo.<!INVISIBLE_REFERENCE!>Nested<!>? = null
private fun foo(): <!INVISIBLE_REFERENCE!>Nested<!>? = null
private fun bar(): p.Foo.<!INVISIBLE_REFERENCE!>Nested<!>? = null
@@ -1,13 +1,13 @@
package
package p {
public fun bar(): p.Foo.Nested?
public fun foo(): p.Foo.Nested?
private fun bar(): p.Foo.Nested?
private fun foo(): p.Foo.Nested?
public final class Bar : p.Foo {
public constructor Bar()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun foo(): p.Foo.Nested?
protected final fun foo(): p.Foo.Nested?
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -8,4 +8,4 @@ package a
import pack1.*
class X : <!INVISIBLE_REFERENCE, INVISIBLE_MEMBER!>SomeClass<!>()
private class X : <!INVISIBLE_REFERENCE, INVISIBLE_MEMBER!>SomeClass<!>()
@@ -2,7 +2,7 @@ package
package a {
public final class X : pack1.SomeClass {
private final class X : pack1.SomeClass {
public constructor X()
invisible_fake open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
invisible_fake open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -11,4 +11,4 @@ package a
import pack1.SomeClass.*
class X : <!INVISIBLE_REFERENCE, INVISIBLE_MEMBER, FINAL_SUPERTYPE!>N<!>()
private class X : <!INVISIBLE_REFERENCE, INVISIBLE_MEMBER, FINAL_SUPERTYPE!>N<!>()
@@ -2,7 +2,7 @@ package
package a {
public final class X : pack1.SomeClass.N {
private final class X : pack1.SomeClass.N {
public constructor X()
invisible_fake open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
invisible_fake open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int