Generate private methods in TraitImpl as private, don't generate delegation to private trait methods
This commit is contained in:
+3
-5
@@ -1,11 +1,9 @@
|
||||
public interface PrivateInTrait {
|
||||
final class DefaultImpls {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
static java.lang.String getNn(PrivateInTrait $this) { /* compiled code */ }
|
||||
private static java.lang.String getNn(PrivateInTrait $this) { /* compiled code */ }
|
||||
|
||||
static void setNn(@org.jetbrains.annotations.NotNull PrivateInTrait $this, java.lang.String value) { /* compiled code */ }
|
||||
private static void setNn(PrivateInTrait $this, java.lang.String value) { /* compiled code */ }
|
||||
|
||||
@org.jetbrains.annotations.Nullable
|
||||
static java.lang.String getN(PrivateInTrait $this) { /* compiled code */ }
|
||||
private static java.lang.String getN(PrivateInTrait $this) { /* compiled code */ }
|
||||
}
|
||||
}
|
||||
@@ -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