Report about wrong number of type arguments instead of ambiguity

#KT-7975 Fixed
 #KT-1809 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-06-19 20:35:00 +03:00
parent 24f1bbfb46
commit 0f4497256b
5 changed files with 31 additions and 2 deletions
@@ -0,0 +1,15 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
fun myFun(i : String) {}
fun myFun(i : Int) {}
fun test1() {
myFun<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Int><!>(3)
<!NONE_APPLICABLE!>myFun<!><String>('a')
}
fun test2() {
val m0 = java.util.<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>HashMap<!>()
val m1 = java.util.HashMap<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String, String, String><!>()
val m2 = java.util.HashMap<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String><!>()
}
@@ -0,0 +1,6 @@
package
public fun myFun(/*0*/ i: kotlin.Int): kotlin.Unit
public fun myFun(/*0*/ i: kotlin.String): kotlin.Unit
public fun test1(): kotlin.Unit
public fun test2(): kotlin.Unit