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:
Alexander Udalov
2015-11-30 22:50:20 +03:00
parent b1fa740341
commit d3c17ec337
17 changed files with 98 additions and 69 deletions
@@ -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)