Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt
T
Svetlana Isakova 65e2f47bc3 try intersection of upper bounds as a suggestion
not each bound itself
while resolving constraint system
2013-10-16 19:51:53 +04:00

14 lines
251 B
Kotlin

fun <R : Any> unescape(value: Any): R? = throw Exception("$value")
fun <T: Any> foo(v: Any): T? = unescape(v)
//--------------
trait A
fun <R : A> unescapeA(value: Any): R? = throw Exception("$value")
fun <T: A> fooA(v: Any): T? = unescapeA(v)