improved diagnostic message test
added ability to denote required message type (text or html)
This commit is contained in:
@@ -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>
|
||||
<R, T : jet.List<R>>
|
||||
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<jet.Int></b>
|
||||
</font>
|
||||
is not a subtype of <b>
|
||||
jet.List<jet.Int></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>
|
||||
<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<U></td>
|
||||
<td style="white-space:nowrap;font-weight:bold;">
|
||||
)</td>
|
||||
<td style="white-space:nowrap;font-weight:bold;">
|
||||
: jet.MutableSet<U></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>
|
||||
<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
|
||||
Reference in New Issue
Block a user