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