Render inferred and not inferred type parameters

while rendering a resolved call
This commit is contained in:
Svetlana Isakova
2014-04-24 20:03:38 +04:00
parent aa40fd6b56
commit a57b4f6459
6 changed files with 95 additions and 17 deletions
@@ -1,8 +1,9 @@
<!-- noneApplicable1 -->
<html>
None of the following functions can be called with the arguments supplied. <ul>
<li>foo(kotlin.Int, kotlin.String, <font color=red><b>kotlin.Boolean</b></font>) <i>defined in</i> root package</li>
<li>foo(<font color=red><b>kotlin.Boolean</b></font>, kotlin.String) <i>defined in</i> root package</li>
<li>foo(kotlin.Int<font color=red><b>)</b></font> <i>defined in</i> root package</li>
None of the following functions can be called with the arguments supplied.
<ul>
<li>foo(Int, String, <font color=red><b>Boolean</b></font>) <i>defined in</i> root package</li>
<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>
</ul>
</html>
@@ -0,0 +1,15 @@
// !DIAGNOSTICS_NUMBER: 1
// !DIAGNOSTICS: NONE_APPLICABLE
// !MESSAGE_TYPE: HTML
package p
fun <T> foo(t: T, a: Any, l: List<T>) = 1
fun <T, R> foo(t: T, r: R, lt: MutableList<T>, lr: MutableList<R>) = 2
fun <T> foo(t: T, a: Any, lt: MutableList<T>, lr: MutableList<T>) = 3
fun use(vararg a: Any?) = a
fun test(a: Any, li: MutableList<Int>, ls: MutableList<String>) {
use(foo(11, a, li, ls))
}
@@ -0,0 +1,15 @@
<!-- noneApplicableGeneric1 -->
<html>
None of the following functions can be called with the arguments supplied.
<ul>
<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>
<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(<font color=red><b>T</b></font>, Any, MutableList<`<font color=red><b>T</b></font>>, MutableList<`<font color=red><b>T</b></font>>)<br/>
<i>where</i> <font color=red><b>T</b></font><i> cannot be inferred</i><i> for </i><br/>
<b>fun</b> <`T> foo(t: T, a: Any, lt: MutableList<`T>, lr: MutableList<`T>): Int <i>defined in</i> p</li>
</ul>
</html>