KT-59836 [SLC] Copy type parameters from the parent interface to DefaultImpls methods

This commit is contained in:
Pavel Mikhailovskii
2023-07-10 13:11:21 +00:00
committed by Space Team
parent ddb27f2b26
commit 6e6a4d6411
22 changed files with 146 additions and 10 deletions
@@ -0,0 +1,11 @@
public abstract interface Foo /* Foo*/<X, Y> {
public abstract <Z> void foo(X, Y, Z);// <Z> foo(X, Y, Z)
public abstract int getX();// getX()
public static final class DefaultImpls /* Foo.DefaultImpls*/ {
public static <Z> void foo(@org.jetbrains.annotations.NotNull() Foo, X, Y, Z);// <Z> foo(Foo, X, Y, Z)
public static int getX(@org.jetbrains.annotations.NotNull() Foo);// getX(Foo)
}
}
@@ -0,0 +1,11 @@
public abstract interface Foo /* Foo*/<X, Y> {
public abstract <Z> void foo(X, Y, Z);// <Z> foo(X, Y, Z)
public abstract int getX();// getX()
public static final class DefaultImpls /* Foo.DefaultImpls*/ {
public static <X, Y, Z> void foo(@org.jetbrains.annotations.NotNull() Foo<X, Y>, X, Y, Z);// <X, Y, Z> foo(Foo<X, Y>, X, Y, Z)
public static <X, Y> int getX(@org.jetbrains.annotations.NotNull() Foo<X, Y>);// <X, Y> getX(Foo<X, Y>)
}
}
@@ -0,0 +1,6 @@
// Foo
interface Foo<X, Y> {
fun <Z> foo(x: X, y: Y, z: Z) {}
val x: Int get() = 0
}
@@ -19,10 +19,10 @@ public abstract interface C /* p.C*/<T> extends p.B {
public static void getProp3$annotations();// getProp3$annotations()
@org.jetbrains.annotations.NotNull()
public static java.lang.String c(@org.jetbrains.annotations.NotNull() p.C<T>);// c(p.C<T>)
public static <T> java.lang.String c(@org.jetbrains.annotations.NotNull() p.C<T>);// <T> c(p.C<T>)
public static int getProp3(@org.jetbrains.annotations.NotNull() p.C<T>);// getProp3(p.C<T>)
public static <T> int getProp3(@org.jetbrains.annotations.NotNull() p.C<T>);// <T> getProp3(p.C<T>)
public static void setProp3(@org.jetbrains.annotations.NotNull() p.C<T>, int);// setProp3(p.C<T>, int)
public static <T> void setProp3(@org.jetbrains.annotations.NotNull() p.C<T>, int);// <T> setProp3(p.C<T>, int)
}
}