Protected in final inspection: protected modifier is effectively private in final classes #KT-6674 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-03-25 14:24:49 +03:00
committed by Mikhail Glukhikh
parent 20bac6178c
commit a541aaafd8
14 changed files with 200 additions and 1 deletions
@@ -0,0 +1,37 @@
class F {
protected val foo: Int = 0
protected fun bar() {}
protected class Nested
}
class G {
interface H {
protected val foo: Int = 0
protected fun bar() {}
protected class Nested
}
}
sealed class S {
protected val foo: Int = 0
protected fun bar() {}
protected class Nested : S()
protected object Obj : S()
}
enum class E {
SINGLE {
override val x = foo()
};
abstract val x: Int
protected fun foo() = 42
}