Override/Implement actions are now inherits visibility.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
open class A() {
|
||||
protected open fun protectedFun() { }
|
||||
internal open fun internalFun() {}
|
||||
public open fun publicFun() {}
|
||||
}
|
||||
|
||||
trait B {
|
||||
protected open val protectedProperty : Int
|
||||
internal open val internalProperty : Int
|
||||
public open val publicProperty : Int
|
||||
}
|
||||
|
||||
class C : A(), B {
|
||||
|
||||
override fun internalFun() {
|
||||
super<A>.internalFun()
|
||||
}
|
||||
override val internalProperty : Int = 0
|
||||
protected override fun protectedFun() {
|
||||
super<A>.protectedFun()
|
||||
}
|
||||
protected override val protectedProperty : Int = 0
|
||||
public override fun publicFun() {
|
||||
super<A>.publicFun()
|
||||
}
|
||||
public override val publicProperty : Int = 0
|
||||
}
|
||||
Reference in New Issue
Block a user