protected is deprecated inside objects and forbidden inside annotations and enum entries
This commit is contained in:
committed by
Mikhail Glukhikh
parent
407d46baad
commit
846d7cac69
@@ -0,0 +1,21 @@
|
||||
class My(protected val x: Int) {
|
||||
class Her(protected val x: Int)
|
||||
|
||||
inner class Its(protected val x: Int)
|
||||
}
|
||||
|
||||
object Your {
|
||||
<!DEPRECATED_MODIFIER_CONTAINING_DECLARATION!>protected<!> fun foo() = 3
|
||||
}
|
||||
|
||||
annotation class His(<!WRONG_MODIFIER_CONTAINING_DECLARATION!>protected<!> val x: Int)
|
||||
|
||||
enum class Our(protected val x: Int) {
|
||||
FIRST(42) {
|
||||
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>protected<!> fun foo() = 13
|
||||
}
|
||||
}
|
||||
|
||||
interface Their {
|
||||
<!DEPRECATED_MODIFIER_CONTAINING_DECLARATION!>protected<!> fun foo() = 7
|
||||
}
|
||||
Reference in New Issue
Block a user