fixed ArrayIndexOutOfBoundsException in quick fix util

(in 'getParameterCorrespondingToValueArgumentPassedInCall')
This commit is contained in:
Svetlana Isakova
2013-08-12 15:34:35 +04:00
parent 623c6e50e1
commit 358c1d6f71
3 changed files with 23 additions and 2 deletions
@@ -0,0 +1,12 @@
// "???" "false"
//ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>jet.Array&lt;jet.String&gt;</td></tr><tr><td>Found:</td><td>jet.Array&lt;jet.Int&gt;</td></tr></table></html>
//this test checks that there is no ArrayIndexOutOfBoundsException when there are more arguments than parameters
fun <T> array1(vararg a : T) = a
fun main(args : Array<String>) {
val b = array1(1, 1)
join(1, "4", *b, "3")
}
fun join(x : Int, vararg t : String) : String = "$x$t"