Prevent generation of delegations to interfaces private methods

#KT-13381 Fixed
 #KT-13996 Fixed
This commit is contained in:
Denis Zharkov
2016-09-22 18:21:03 +03:00
parent 06c804787f
commit 217f033552
6 changed files with 67 additions and 1 deletions
@@ -0,0 +1,10 @@
interface A {
// There must be no delegation methods for 'log' and 'bar' in C as they are private
private val log: String get() = "O"
private fun bar() = "K"
fun foo() = log + bar()
}
interface B : A
class C : B
@@ -0,0 +1,30 @@
@kotlin.Metadata
public final class A$DefaultImpls {
inner class A$DefaultImpls
private static method bar(p0: A): java.lang.String
public static @org.jetbrains.annotations.NotNull method foo(p0: A): java.lang.String
private static method getLog(p0: A): java.lang.String
}
@kotlin.Metadata
public interface A {
inner class A$DefaultImpls
public abstract @org.jetbrains.annotations.NotNull method foo(): java.lang.String
}
@kotlin.Metadata
public final class B$DefaultImpls {
inner class B$DefaultImpls
public static @org.jetbrains.annotations.NotNull method foo(p0: B): java.lang.String
}
@kotlin.Metadata
public interface B {
inner class B$DefaultImpls
}
@kotlin.Metadata
public final class C {
public method <init>(): void
public @org.jetbrains.annotations.NotNull method foo(): java.lang.String
}