get rid of 'internal protected' visibility
This commit is contained in:
@@ -7,12 +7,10 @@ fun test() {
|
||||
val p = test.Public()
|
||||
if (p.public is Int) <!AUTOCAST_IMPOSSIBLE!>p.public<!> + 1
|
||||
if (p.<!INVISIBLE_MEMBER!>protected<!> is Int) <!AUTOCAST_IMPOSSIBLE!>p.<!INVISIBLE_MEMBER!>protected<!><!> + 1
|
||||
if (p.<!INVISIBLE_MEMBER!>i_protected<!> is Int) p.<!INVISIBLE_MEMBER!>i_protected<!> + 1
|
||||
if (p.internal is Int) p.internal + 1
|
||||
val i = test.Public()
|
||||
if (i.public is Int) <!AUTOCAST_IMPOSSIBLE!>i.public<!> + 1
|
||||
if (i.<!INVISIBLE_MEMBER!>protected<!> is Int) <!AUTOCAST_IMPOSSIBLE!>i.<!INVISIBLE_MEMBER!>protected<!><!> + 1
|
||||
if (i.<!INVISIBLE_MEMBER!>i_protected<!> is Int) i.<!INVISIBLE_MEMBER!>i_protected<!> + 1
|
||||
if (i.internal is Int) i.internal + 1
|
||||
}
|
||||
|
||||
@@ -22,12 +20,10 @@ package test
|
||||
public class Public() {
|
||||
public val public : Int? = 1;
|
||||
protected val protected : Int? = 1;
|
||||
internal protected val i_protected : Int? = 1;
|
||||
val internal : Int? = 1
|
||||
}
|
||||
internal class Internal() {
|
||||
public val public : Int? = 1;
|
||||
protected val protected : Int? = 1;
|
||||
internal protected val i_protected : Int? = 1;
|
||||
val internal : Int? = 1
|
||||
}
|
||||
@@ -40,7 +40,7 @@ fun test_fun_stays_protected(g: G) {
|
||||
|
||||
//------------
|
||||
open class H {
|
||||
internal protected open fun pi_fun() {}
|
||||
protected open fun pi_fun() {}
|
||||
}
|
||||
|
||||
class I : H() {
|
||||
@@ -48,7 +48,7 @@ class I : H() {
|
||||
}
|
||||
|
||||
class J : H() {
|
||||
internal override fun pi_fun() {}
|
||||
<!CANNOT_CHANGE_ACCESS_PRIVILEGE!>internal<!> override fun pi_fun() {}
|
||||
}
|
||||
|
||||
class K : H() {
|
||||
@@ -69,11 +69,11 @@ class M : L() {
|
||||
}
|
||||
//---------------
|
||||
trait R {
|
||||
internal protected fun foo() {}
|
||||
<!INCOMPATIBLE_MODIFIERS!>internal<!> <!INCOMPATIBLE_MODIFIERS!>protected<!> fun foo() {}
|
||||
}
|
||||
|
||||
trait P : R {
|
||||
internal override fun foo() {}
|
||||
<!CANNOT_CHANGE_ACCESS_PRIVILEGE!>internal<!> override fun foo() {}
|
||||
}
|
||||
|
||||
trait Q : R {
|
||||
|
||||
Reference in New Issue
Block a user