mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
Redundant/conflicting projections
This commit is contained in:
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class MethodWithTypeParameters {
|
||||
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<out B>, c: List<in String?>) where B : List<Cloneable>")
|
||||
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<out B>, c: MutableList<in String?>) where B : List<Cloneable>")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b, List<? super String> list) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class MethodWithTypeParameters : Object() {
|
||||
public open fun <erased A, erased B : Runnable> foo(p0 : A, p1 : List<out B>, p2: List<in String?>) where B : List<Cloneable> {
|
||||
public open fun <erased A, erased B : Runnable> foo(p0 : A, p1 : List<out B>, p2: MutableList<in String?>) where B : List<Cloneable> {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.MethodWithTypeParameters : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.MethodWithTypeParameters
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable & jet.List<java.lang.Cloneable>>foo(/*0*/ p0: A, /*1*/ p1: jet.List<out B>, /*2*/ p2: jet.List<in jet.String?>): jet.Tuple0
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable & jet.List<java.lang.Cloneable>>foo(/*0*/ p0: A, /*1*/ p1: jet.List<out B>, /*2*/ p2: jet.MutableList<in jet.String?>): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeParameterBoundStructure1 {
|
||||
@ExpectLoadError("'java.lang.Runnable?' type in method signature has 0 type arguments, while 'Runnable<Int>' in alternative signature has 1 of them")
|
||||
@KotlinSignature("fun <A, B : Runnable<Int>> foo(a : A, b : List<out B>, c: List<in String?>) where B : List<Cloneable>")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b, List<? super String> list) {
|
||||
@KotlinSignature("fun <A, B : Runnable<Int>> foo(a : A, b : List<out B>) where B : List<Cloneable>")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeParameterBoundStructure1 : Object() {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<out B>?, p2: List<in String?>?) where B : List<Cloneable?>? {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<out B>?) where B : List<Cloneable?>? {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongTypeParameterBoundStructure1 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeParameterBoundStructure1
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable? & jet.List<java.lang.Cloneable?>?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List<out B>?, /*2*/ p2: jet.List<in jet.String?>?): jet.Tuple0
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable? & jet.List<java.lang.Cloneable?>?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List<out B>?): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeParameterBoundStructure2 {
|
||||
@ExpectLoadError("'jet.List<java.lang.Cloneable?>?' type in method signature has 1 type arguments, while 'List' in alternative signature has 0 of them")
|
||||
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<out B>, c: List<in String?>) where B : List")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b, List<? super String> list) {
|
||||
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<out B>) where B : List")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeParameterBoundStructure2 : Object() {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<out B>?, p2: List<in String?>?) where B : List<Cloneable?>? {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<out B>?) where B : List<Cloneable?>? {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongTypeParameterBoundStructure2 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeParameterBoundStructure2
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable? & jet.List<java.lang.Cloneable?>?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List<out B>?, /*2*/ p2: jet.List<in jet.String?>?): jet.Tuple0
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable? & jet.List<java.lang.Cloneable?>?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List<out B>?): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeVariance {
|
||||
@ExpectLoadError("Variance mismatch, actual: in, in alternative signature: ")
|
||||
@ExpectLoadError("Variance mismatch, actual: out, in alternative signature: ")
|
||||
@KotlinSignature("fun copy(a : List<out Number>, b : List<Number>) : MutableList<Number>")
|
||||
public List<Number> copy(List<? extends Number> from, List<? super Number> to) {
|
||||
public List<Number> copy(List<? extends Number> from, List<? extends Number> to) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeVariance : Object() {
|
||||
public open fun copy(p0 : List<out jet.Number?>?, p1 : List<in jet.Number?>?) : MutableList<jet.Number?>? {
|
||||
public open fun copy(p0 : List<out jet.Number?>?, p1 : List<out jet.Number?>?) : MutableList<jet.Number?>? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongTypeVariance : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeVariance
|
||||
public open fun copy(/*0*/ p0: jet.List<out jet.Number?>?, /*1*/ p1: jet.List<in jet.Number?>?): jet.MutableList<jet.Number?>?
|
||||
public open fun copy(/*0*/ p0: jet.List<out jet.Number?>?, /*1*/ p1: jet.List<out jet.Number?>?): jet.MutableList<jet.Number?>?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user