protected & internal are now forbidden in interfaces
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5f43628f1b
commit
cba6870f52
@@ -0,0 +1,7 @@
|
||||
interface My {
|
||||
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>internal<!> val x: Int
|
||||
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>internal<!> val xxx: Int
|
||||
get() = 0
|
||||
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>internal<!> fun foo(): Int
|
||||
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>internal<!> fun bar() = 42
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
public interface My {
|
||||
internal abstract val x: kotlin.Int
|
||||
internal open val xxx: kotlin.Int
|
||||
internal open fun bar(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal abstract fun foo(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -17,5 +17,5 @@ enum class Our(protected val x: Int) {
|
||||
}
|
||||
|
||||
interface Their {
|
||||
<!DEPRECATED_MODIFIER_CONTAINING_DECLARATION!>protected<!> fun foo() = 7
|
||||
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>protected<!> fun foo() = 7
|
||||
}
|
||||
Reference in New Issue
Block a user