KT-59836 [SLC] Copy type parameters from the parent interface to DefaultImpls methods
This commit is contained in:
committed by
Space Team
parent
ddb27f2b26
commit
6e6a4d6411
+5
@@ -0,0 +1,5 @@
|
||||
interface Foo<X, Y> {
|
||||
fun <Z> foo(x: X, y: Y, z: Z) {}
|
||||
|
||||
val x: Int get() = 0
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
@kotlin.Metadata()
|
||||
public abstract interface Foo<X extends java.lang.Object, Y extends java.lang.Object> {
|
||||
|
||||
public abstract <Z extends java.lang.Object>void foo(X x, Y y, Z z);
|
||||
|
||||
public abstract int getX();
|
||||
|
||||
@kotlin.Metadata()
|
||||
public static final class DefaultImpls {
|
||||
|
||||
public DefaultImpls() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static <X extends java.lang.Object, Y extends java.lang.Object, Z extends java.lang.Object>void foo(@org.jetbrains.annotations.NotNull()
|
||||
Foo<X, Y> $this, X x, Y y, Z z) {
|
||||
}
|
||||
|
||||
public static <X extends java.lang.Object, Y extends java.lang.Object>int getX(@org.jetbrains.annotations.NotNull()
|
||||
Foo<X, Y> $this) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -127,6 +127,12 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultImplsWithTypeParameters.kt")
|
||||
public void testDefaultImplsWithTypeParameters() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultImplsWithTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultPackage.kt")
|
||||
public void testDefaultPackage() throws Exception {
|
||||
|
||||
+6
@@ -127,6 +127,12 @@ public class IrClassFileToSourceStubConverterTestGenerated extends AbstractIrCla
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultImplsWithTypeParameters.kt")
|
||||
public void testDefaultImplsWithTypeParameters() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultImplsWithTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultPackage.kt")
|
||||
public void testDefaultPackage() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user