Select most specific overloaded function/property by explicitly used arguments only.

Major rewrite of OverloadingConflictResolver.
This commit is contained in:
Dmitry Petrov
2015-12-15 16:20:09 +03:00
parent 52f0e0bc93
commit 09f53ea0bb
24 changed files with 689 additions and 172 deletions
@@ -0,0 +1,12 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
object X1
object X2
fun overloadedFun5(vararg ss: String) = X1
fun overloadedFun5(s: String, vararg ss: String) = X2
val test1: X1 = <!OVERLOAD_RESOLUTION_AMBIGUITY!>overloadedFun5<!>("")
val test2 = <!OVERLOAD_RESOLUTION_AMBIGUITY!>overloadedFun5<!>("", "")
val test3: X2 = overloadedFun5(s = "", ss = "")
val test4: X1 = overloadedFun5(ss = "")