improved diagnostic message test

added ability to denote required message type (text or html)
This commit is contained in:
Svetlana Isakova
2013-10-16 16:48:20 +04:00
parent 66678cdda9
commit 14cff91fed
8 changed files with 47 additions and 105 deletions
@@ -1,5 +1,6 @@
// !DIAGNOSTICS_NUMBER: 3
// !DIAGNOSTICS: TYPE_INFERENCE_UPPER_BOUND_VIOLATED
// !MESSAGE_TYPE: TEXT
package i
@@ -1,32 +0,0 @@
<!-- upperBoundViolated1 -->
<html>
Type parameter bound for <b>
T</b>
in <table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;R, T : jet.List&lt;R&gt;>
foo</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
r: R,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
list: T</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: jet.Unit</td>
</tr>
</table>
is not satisfied: inferred type <font color=red>
<b>
jet.Collection&lt;jet.Int&gt;</b>
</font>
is not a subtype of <b>
jet.List&lt;jet.Int&gt;</b>
</html>
@@ -0,0 +1,3 @@
<!-- upperBoundViolated1 -->
Type parameter bound for T in fun <R, T : jet.List<R>> foo(r: R, list: T): jet.Unit
is not satisfied: inferred type jet.Collection<jet.Int> is not a subtype of jet.List<jet.Int>
@@ -1,32 +0,0 @@
<!-- upperBoundViolated2 -->
<html>
Type parameter bound for <b>
V</b>
in <table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;V : U, U>
bar</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
v: V,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
u: jet.MutableSet&lt;U&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: jet.MutableSet&lt;U&gt;</td>
</tr>
</table>
is not satisfied: inferred type <font color=red>
<b>
jet.Any</b>
</font>
is not a subtype of <b>
jet.String</b>
</html>
@@ -0,0 +1,3 @@
<!-- upperBoundViolated2 -->
Type parameter bound for V in fun <V : U, U> bar(v: V, u: jet.MutableSet<U>): jet.MutableSet<U>
is not satisfied: inferred type jet.Any is not a subtype of jet.String
@@ -1,34 +0,0 @@
<!-- upperBoundViolated3 -->
<html>
Type parameter bound for <b>
T</b>
in <table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T : R, R : i.B>
baz</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
t: T,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
r: R</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: jet.Unit <b>
where</b>
T : i.A</td>
</tr>
</table>
is not satisfied: inferred type <font color=red>
<b>
i.A</b>
</font>
is not a subtype of <b>
i.B</b>
</html>
@@ -0,0 +1,3 @@
<!-- upperBoundViolated3 -->
Type parameter bound for T in fun <T : R, R : i.B> baz(t: T, r: R): jet.Unit where T : i.A
is not satisfied: inferred type i.A is not a subtype of i.B