complete type inference only for one candidate
(the most specific) to avoid exponential resolve of value arguments for several candidates where type inference is incomplete (or depends on expected type)
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
package f
|
||||
|
||||
fun f<T>(<!UNUSED_PARAMETER!>i<!>: Int, <!UNUSED_PARAMETER!>c<!>: Collection<T>): List<T> {throw Exception()}
|
||||
fun f<T>(<!UNUSED_PARAMETER!>a<!>: Any, <!UNUSED_PARAMETER!>l<!>: List<T>): Collection<T> {throw Exception()}
|
||||
|
||||
fun test<T>(<!UNUSED_PARAMETER!>l<!>: List<T>) {
|
||||
<!CANNOT_COMPLETE_RESOLVE!>f<!>(1, <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyList<!>())
|
||||
}
|
||||
|
||||
fun emptyList<T>(): List<T> {throw Exception()}
|
||||
Reference in New Issue
Block a user