No parameter names in types for error messages

This commit is contained in:
Valentin Kipyatkov
2016-09-14 16:15:04 +03:00
parent 6527ada775
commit 3bd39df587
11 changed files with 32 additions and 10 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ Type inference failed:
<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>(x: ???) &rarr; ???</b></font></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>(???) &rarr; ???</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
@@ -0,0 +1,9 @@
// !DIAGNOSTICS_NUMBER: 1
// !DIAGNOSTICS: TYPE_MISMATCH
// !MESSAGE_TYPE: TEXT
fun foo(handler: (s: String) -> Unit) {
bar(handler)
}
fun bar(a: (n: Int) -> Unit) {}
@@ -0,0 +1,2 @@
<!-- typeMismatchWithFunctionalType1 -->
Type mismatch: inferred type is (String) -> Unit but (Int) -> Unit was expected