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:
+1
-1
@@ -10,5 +10,5 @@ import foo.*
|
||||
fun f<T>(<!UNUSED_PARAMETER!>l<!>: List<T>) {}
|
||||
|
||||
fun test<T>(l: List<T>) {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>f(l)<!>
|
||||
<!CANNOT_COMPLETE_RESOLVE!>f<!>(l)
|
||||
}
|
||||
+1
-1
@@ -3,5 +3,5 @@ fun f1<T>(<!UNUSED_PARAMETER!>l<!>: <!UNRESOLVED_REFERENCE!>List2<!><T>): T {thr
|
||||
fun f1<T>(<!UNUSED_PARAMETER!>c<!>: Collection<T>): T{throw Exception()}
|
||||
|
||||
fun test<T>(l: List<T>) {
|
||||
f1(l)
|
||||
<!CANNOT_COMPLETE_RESOLVE!>f1<!>(l)
|
||||
}
|
||||
Reference in New Issue
Block a user