Improved error reporting for candidates with wrong parameter count

This commit is contained in:
Stanislav Erokhin
2015-08-31 20:32:59 +03:00
parent 8ea6f36903
commit 5ded315cbb
23 changed files with 82 additions and 52 deletions
+1
View File
@@ -3,6 +3,7 @@
// !MESSAGE_TYPE: HTML
fun foo(i: Int, s: String, b: Boolean) {}
fun foo(i: Int, s: Int) {}
fun foo(b: Boolean, s: String) {}
fun foo(i: Int) {}
+1 -2
View File
@@ -3,7 +3,6 @@
None of the following functions can be called with the arguments supplied.
<ul>
<li>foo(<font color=red><b>Boolean</b></font>, String) <i>defined in</i> root package</li>
<li>foo(Int<font color=red><b>)</b></font> <i>defined in</i> root package</li>
<li>foo(Int, String, <font color=red><b>Boolean</b></font>) <i>defined in</i> root package</li>
<li>foo(Int, <font color=red><b>Int</b></font>) <i>defined in</i> root package</li>
</ul>
</html>
@@ -8,8 +8,5 @@ None of the following functions can be called with the arguments supplied.
<li>foo(Int, <font color=red><b>R</b></font>, MutableList<`Int>, MutableList<`<font color=red><b>R</b></font>>)<br/>
<i>where</i> <font color=red><b>R</b></font><i> cannot be inferred</i>; T = Int<i> for </i><br/>
<b>fun</b> <`T, R> foo(t: T, r: R, lt: MutableList<`T>, lr: MutableList<`R>): Int <i>defined in</i> p</li>
<li>foo(Int, Any, List<`Int><font color=red><b>)</b></font><br/>
<i>where</i> T = Int<i> for </i><br/>
<b>fun</b> <`T> foo(t: T, a: Any, l: List<`T>): Int <i>defined in</i> p</li>
</ul>
</html>