Added checking for same variance in alternative signatures.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package test;
|
||||
|
||||
import java.lang.Number;
|
||||
import java.lang.UnsupportedOperationException;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class WrongTypeVariance {
|
||||
@KotlinSignature("fun copy(a : List<out Number>, b : List<Number>) : List<Number>")
|
||||
public List<Number> copy(List<? extends Number> from, List<? super Number> to) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeVariance : Object() {
|
||||
public open fun copy(p0 : List<out java.lang.Number?>?, p1 : List<in java.lang.Number?>?) : List<java.lang.Number?>? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace test
|
||||
|
||||
public open class test.WrongTypeVariance : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeVariance
|
||||
public open fun copy(/*0*/ p0: java.util.List<out java.lang.Number?>?, /*1*/ p1: java.util.List<in java.lang.Number?>?): java.util.List<java.lang.Number?>?
|
||||
}
|
||||
Reference in New Issue
Block a user