Fix inheritance from protected members of interfaces

#KT-3029 Fixed
This commit is contained in:
Alexander Udalov
2015-09-09 12:31:20 +03:00
parent bb17724f96
commit a1a2adf523
5 changed files with 86 additions and 4 deletions
@@ -0,0 +1,30 @@
interface A {
protected fun foo()
protected fun fooImpl() { }
protected var bar: Int
public var baz: String
public get() = ""
protected set(value) {}
fun test(): String {
foo()
fooImpl()
bar = bar + 1
baz = baz + "1"
return "OK"
}
}
class B : A {
protected override fun foo() {}
protected override var bar: Int = 42
override var baz: String = ""
protected set
}
fun box() = B().test()