Generate static accessors fro protected functions in different packages
#KT-4617 Fixed
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user