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:
Svetlana Isakova
2012-11-09 15:50:16 +04:00
parent dda3091dfb
commit e9c8be8449
13 changed files with 126 additions and 49 deletions
@@ -0,0 +1,9 @@
package f
fun h<R>(<!UNUSED_PARAMETER!>f<!>: (Boolean) -> R) = 1
fun h<R>(<!UNUSED_PARAMETER!>f<!>: (String) -> R) = 2
fun test() = <!CANNOT_COMPLETE_RESOLVE!>h<!>{ <!CANNOT_INFER_PARAMETER_TYPE!>i<!> -> getAnswer() }
fun getAnswer() = 42