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
-16
View File
@@ -1,16 +0,0 @@
fun example(value : Int) {
val result: Int = if (value == 0) 1
else if (value == 1) 2
else throw IllegalArgumentException()
result
}
fun <T, S, U : T> foo(u: U) where U : S {}
fun main(args : Array<String>) {
foo(null!!)
}
fun box() = "OK"