Fixed NPE in ArgumentMatchImpl.getStatus

Check value arguments if there is wrong number of type arguments
This commit is contained in:
Svetlana Isakova
2014-08-14 11:41:30 +04:00
parent 05637226e1
commit bbeb44e6ee
6 changed files with 60 additions and 27 deletions
@@ -0,0 +1,14 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun <T> foo(t: T) = t
fun test1() {
foo<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Int, String><!>(<!TYPE_MISMATCH!>""<!>)
}
fun <T, R> bar(t: T, r: R) {}
fun test2() {
bar<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Int><!>(<!TYPE_MISMATCH!>""<!>, "")
}