try intersection of upper bounds as a suggestion
not each bound itself while resolving constraint system
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user