Added test for propagation of projection kind.
#KT-2776 in progress
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
import java.util.*;
|
||||
|
||||
public interface InheritProjectionKind {
|
||||
|
||||
public interface Super {
|
||||
@KotlinSignature("fun foo(p: MutableList<in String>)")
|
||||
void foo(List<String> p);
|
||||
}
|
||||
|
||||
public interface Sub extends Super {
|
||||
void foo(List<String> p);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
public trait InheritProjectionKind: Object {
|
||||
|
||||
public trait Super: Object {
|
||||
public fun foo(p0: MutableList<in String>)
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
override fun foo(p0: MutableList<in String>)
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public abstract trait test.InheritProjectionKind : java.lang.Object {
|
||||
public abstract trait test.InheritProjectionKind.Sub : test.InheritProjectionKind.Super {
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: jet.MutableList<in jet.String>): jet.Tuple0
|
||||
}
|
||||
public abstract trait test.InheritProjectionKind.Super : java.lang.Object {
|
||||
public abstract fun foo(/*0*/ p0: jet.MutableList<in jet.String>): jet.Tuple0
|
||||
}
|
||||
}
|
||||
@@ -461,6 +461,11 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
doTest("compiler/testData/loadJava/kotlinSignature/propagation/parameter/InheritNullability.java");
|
||||
}
|
||||
|
||||
@TestMetadata("InheritProjectionKind.java")
|
||||
public void testInheritProjectionKind() throws Exception {
|
||||
doTest("compiler/testData/loadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.java");
|
||||
}
|
||||
|
||||
@TestMetadata("InheritReadOnliness.java")
|
||||
public void testInheritReadOnliness() throws Exception {
|
||||
doTest("compiler/testData/loadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.java");
|
||||
|
||||
+5
@@ -1351,6 +1351,11 @@ public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyReso
|
||||
doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/parameter/InheritNullability.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InheritProjectionKind.kt")
|
||||
public void testInheritProjectionKind() throws Exception {
|
||||
doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InheritReadOnliness.kt")
|
||||
public void testInheritReadOnliness() throws Exception {
|
||||
doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt");
|
||||
|
||||
Reference in New Issue
Block a user