Report about wrong number of type arguments instead of ambiguity
#KT-7975 Fixed #KT-1809 Fixed
This commit is contained in:
+15
@@ -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><!>()
|
||||
}
|
||||
+6
@@ -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
|
||||
Reference in New Issue
Block a user