FIR: introduce & resolve spread named arguments #KT-31575 Fixed

This commit is contained in:
Mikhail Glukhikh
2019-05-24 23:48:36 +03:00
parent 806d2d628c
commit 2db8409d85
18 changed files with 117 additions and 47 deletions
@@ -5,6 +5,7 @@ fun test() {
foo(1)
foo(1, "")
foo(1, "my", "yours")
foo(1, *arrayOf("my", "yours"))
foo("")
foo(1, 2)
+2 -1
View File
@@ -7,9 +7,10 @@ FILE: vararg.kt
R|/foo|(Int(1))
R|/foo|(Int(1), String())
R|/foo|(Int(1), String(my), String(yours))
R|/foo|(Int(1), *R|kotlin/arrayOf|<R|kotlin/String|>(String(my), String(yours)))
<Inapplicable(INAPPLICABLE): [/foo]>#(String())
<Inapplicable(INAPPLICABLE): [/foo]>#(Int(1), Int(2))
R|/bar|(Int(1), z = Boolean(true), y = R|kotlin/arrayOf|<R|TypeVariable(T)|>(String(my), String(yours)))
R|/bar|(Int(1), z = Boolean(true), y = *R|kotlin/arrayOf|<R|kotlin/String|>(String(my), String(yours)))
<Inapplicable(PARAMETER_MAPPING_ERROR): [/bar]>#(Int(0), z = Boolean(false), y = String(), y = String(other))
<Inapplicable(PARAMETER_MAPPING_ERROR): [/bar]>#(Int(0), String(), Boolean(true))
}