Generate static accessors fro protected functions in different packages

#KT-4617 Fixed
This commit is contained in:
Natalia Ukhorskaya
2014-03-31 15:28:50 +04:00
parent 5b5ecca12a
commit 4a79bfa16d
7 changed files with 78 additions and 3 deletions
@@ -0,0 +1,4 @@
import b.B
import a.BSamePackage
fun box() = if (B().test() == BSamePackage().test()) "OK" else "fail"
@@ -0,0 +1,14 @@
package a
open class A {
protected fun protectedFun(): String = "OK"
}
class BSamePackage: A() {
fun test(): String {
val a = {
protectedFun()
}
return a()
}
}
@@ -0,0 +1,12 @@
package b
import a.A
class B: A() {
fun test(): String {
val a = {
protectedFun()
}
return a()
}
}