HtmlTabledDescriptorRendererTest renamed to DiagnosticMessageTest

This commit is contained in:
Svetlana Isakova
2012-12-25 19:11:25 +04:00
parent 93fd2bf10f
commit b0302246a0
11 changed files with 4 additions and 4 deletions
@@ -0,0 +1,14 @@
// see org.jetbrains.jet.plugin.highlighter.DiagnosticMessageTest
import java.io.Closeable
class MyList<T>(t: T) {}
fun <T> getMyList(t: T): MyList<T> = MyList(t)
fun <T, E: Cloneable> writeToMyList (l: MyList< in T>, t: T) where E: Closeable {}
class Cons<T, E: Cloneable>(l: MyList<in T>, t: T)
fun test1(int: Int, any: Any) {
writeToMyList(getMyList(int), any)
Cons(getMyList(int), any)
}
@@ -0,0 +1,118 @@
<!-- conflictingSubstitutions1 -->
<html>
Type inference failed: Cannot infer type parameter <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, E>
writeToMyList</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
l : MyList&lt;in T&gt;,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
t : T</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: Unit <b>
where</b>
E : java.lang.Cloneable, E : java.io.Closeable</td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
None of the following substitutions</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
MyList&lt;in jet.Any&gt;</b>
</font>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
jet.Any</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
MyList&lt;in jet.Int&gt;</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
jet.Int</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
can be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
MyList&lt;jet.Int&gt;</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
jet.Any</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
</table>
</html>
@@ -0,0 +1,116 @@
<!-- conflictingSubstitutions2 -->
<html>
Type inference failed: Cannot infer type parameter <b>
T</b>
in<table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
ctor</b>
Cons&lt;T, E : java.lang.Cloneable>
</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
l : MyList&lt;in T&gt;,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
t : T</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
</td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
None of the following substitutions</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
MyList&lt;in jet.Any&gt;</b>
</font>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
jet.Any</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
MyList&lt;in jet.Int&gt;</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
jet.Int</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
can be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
MyList&lt;jet.Int&gt;</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
jet.Any</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
</table>
</html>
@@ -0,0 +1,8 @@
class A<T, R>
fun <T, R> foo(a: A<T, R>) = a
fun test() {
foo { it }
foo { x -> x}
foo { (x: Int) -> x}
}
@@ -0,0 +1,48 @@
<!-- functionPlaceholder1 -->
<html>
Type inference failed: <table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T, R>
foo</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a : A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
cannot be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
??? -&gt; ???</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
</table>
</html>
@@ -0,0 +1,48 @@
<!-- functionPlaceholder2 -->
<html>
Type inference failed: <table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T, R>
foo</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a : A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
cannot be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
(???) -&gt; ???</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
</table>
</html>
@@ -0,0 +1,48 @@
<!-- functionPlaceholder3 -->
<html>
Type inference failed: <table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T, R>
foo</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a : A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
cannot be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
(jet.Int) -&gt; ???</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
</tr>
</table>
</html>
@@ -0,0 +1,11 @@
package aa
import java.util.ArrayList
fun foo(f: (List<Int>, ArrayList<String>) -> MutableMap<Int, String>) = f
fun test() {
foo {
""
}
}
@@ -0,0 +1,2 @@
<!-- renderCollectionOfTypes1 -->
Expected 2 parameters of types jet.List<jet.Int>, java.util.ArrayList<jet.String>