[FIR] add vararg arguments support, improve vararg parameters support

This commit is contained in:
Juan Chen
2020-01-27 19:51:35 -08:00
committed by Mikhail Glukhikh
parent 069fbffaa3
commit 188abc243a
75 changed files with 339 additions and 207 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
//test [], get and iterator calls
fun test(createIntNotLong: Boolean): String {
val a = if (createIntNotLong) IntArray(5) else LongArray(5)
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
operator fun String.get(vararg value: Any) : String {
return if (value[0] == 44 && value[1] == "example") "OK" else "fail"
}
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
val array = intArrayOf(11, 12, 13)
val p = array.get(0)
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun test(b: Boolean): String {
val a = if (b) IntArray(5) else LongArray(5)
if (a is IntArray) {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FILE: AT.java