[NI] fix approximation of not denotable types in lambda's function descriptors
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Foo<C : Any> {
|
||||
fun test(candidates: Collection<C>): List<C> {
|
||||
return candidates.sortedBy { 1 }
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val foo = Foo<String>()
|
||||
|
||||
val list = listOf("OK")
|
||||
val sorted = foo.test(list)
|
||||
|
||||
return list.first()
|
||||
}
|
||||
Reference in New Issue
Block a user