Report error when type parameter has a type parameter bound and any other bound
To prevent issues with erasure on JVM: it's unclear what such type parameter should be erased to
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ fun test4() {
|
||||
|
||||
//--------------
|
||||
|
||||
fun <T: A, R> emptyStrangeMap2(t: T): Map<T, R> where R: T, R: A = throw Exception("$t")
|
||||
fun <T: A, R> emptyStrangeMap2(t: T): Map<T, R> where R: T = throw Exception("$t")
|
||||
|
||||
fun test5(a: A) {
|
||||
emptyStrangeMap2(a)
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ package a {
|
||||
public fun </*0*/ T : a.A> emptyListOfA(): kotlin.List<T>
|
||||
public fun </*0*/ T : a.A, /*1*/ R : T> emptyStrangeMap(): kotlin.Map<T, R>
|
||||
public fun </*0*/ T, /*1*/ R : T> emptyStrangeMap1(/*0*/ t: T): kotlin.Map<T, R>
|
||||
public fun </*0*/ T : a.A, /*1*/ R : T> emptyStrangeMap2(/*0*/ t: T): kotlin.Map<T, R> where R : a.A
|
||||
public fun </*0*/ T : a.A, /*1*/ R : T> emptyStrangeMap2(/*0*/ t: T): kotlin.Map<T, R>
|
||||
public fun </*0*/ T : a.A, /*1*/ R : T> emptyStrangeMap3(/*0*/ r: R): kotlin.Map<T, R>
|
||||
public fun </*0*/ T, /*1*/ R : T> emptyStrangeMap4(/*0*/ l: kotlin.MutableList<T>): kotlin.Map<T, R>
|
||||
public fun </*0*/ U, /*1*/ V : U> foo(): U
|
||||
|
||||
Reference in New Issue
Block a user