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)
|
||||
|
||||
Reference in New Issue
Block a user