KT-743 Wrong type inference
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
//KT-743 Wrong type inference
|
||||
// +JDK
|
||||
class List<T>(val head: T, val tail: List<T>? = null)
|
||||
|
||||
fun <T, Q> List<T>.map(f: fun(T): Q): List<T>? = tail.sure<List<T>>().map(f)
|
||||
fun foo<T>(t : T) : T = foo(t)
|
||||
Reference in New Issue
Block a user