Replaced variance with projection kind.
This commit is contained in:
+2
-2
@@ -6,8 +6,8 @@ import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeVariance {
|
||||
@ExpectLoadError("Variance mismatch, actual: out, in alternative signature: ")
|
||||
public class WrongProjectionKind {
|
||||
@ExpectLoadError("Projection kind mismatch, actual: out, in alternative signature: ")
|
||||
@KotlinSignature("fun copy(a : Array<out Number>, b : Array<Number>) : MutableList<Number>")
|
||||
public List<Number> copy(Number[] from, Number[] to) {
|
||||
throw new UnsupportedOperationException();
|
||||
+1
-1
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeVariance : Object() {
|
||||
public open class WrongProjectionKind : Object() {
|
||||
public open fun copy(p0 : Array<out Number>?, p1 : Array<out Number>?) : MutableList<Number>? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongTypeVariance : java.lang.Object {
|
||||
public constructor WrongTypeVariance()
|
||||
public open class WrongProjectionKind : java.lang.Object {
|
||||
public constructor WrongProjectionKind()
|
||||
public open fun copy(/*0*/ p0 : jet.Array<out jet.Number>?, /*1*/ p1 : jet.Array<out jet.Number>?) : jet.MutableList<jet.Number>?
|
||||
}
|
||||
+1
-1
@@ -13,7 +13,7 @@ public interface ChangeProjectionKind1 {
|
||||
}
|
||||
|
||||
public interface Sub extends Super {
|
||||
@ExpectLoadError("Variance mismatch, actual: in, in alternative signature: ")
|
||||
@ExpectLoadError("Projection kind mismatch, actual: in, in alternative signature: ")
|
||||
@KotlinSignature("fun foo(p: MutableList<String>)")
|
||||
void foo(List<String> p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user