KT-9371 Callable reference resolve should not prefer one of the overloads by some magic reasons

#KT-9371 Fixed
This commit is contained in:
Stanislav Erokhin
2015-10-19 14:55:32 +03:00
parent 891e033d5b
commit 553834fa9e
12 changed files with 131 additions and 15 deletions
@@ -6,5 +6,5 @@ fun foo(s: String) {}
fun bar(f: () -> Unit) = 1
fun bar(f: (String) -> Unit) = 2
val x1 = ::foo <!USELESS_CAST!>as () -> Unit<!>
val x2 = bar(<!UNCHECKED_CAST!>::foo as (String) -> Unit<!>)
val x1 = ::<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!> as () -> Unit
val x2 = bar(::<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!> as (String) -> Unit)