Prevent generation of delegations to interfaces private methods
#KT-13381 Fixed #KT-13996 Fixed
This commit is contained in:
+10
@@ -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
|
||||
+30
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user