Generate private methods in TraitImpl as private, don't generate delegation to private trait methods
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
interface Z{
|
||||
|
||||
private fun extension(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
object Z2 : Z {
|
||||
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
val size = Class.forName("Z2").declaredMethods.size
|
||||
if (size != 0) return "fail: $size"
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
var result = "fail"
|
||||
|
||||
interface B {
|
||||
|
||||
private fun test() {
|
||||
result = "OK"
|
||||
}
|
||||
|
||||
class Z {
|
||||
fun ztest(b: B) {
|
||||
b.test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C : B
|
||||
|
||||
fun box(): String {
|
||||
B.Z().ztest(C())
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user