[JS IR BE] Arrays, varargs

This commit is contained in:
Anton Bannykh
2018-09-12 14:31:22 +03:00
parent e24f68c357
commit 2e709a81fa
470 changed files with 761 additions and 585 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
enum class Color { RED, GREEN, BLUE }
fun foo(arr: Array<Color>): Color {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
class A
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun isDigit(a: Int) : String {
val aa = ArrayList<Int> ()
aa.add(239)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
val String.name get() = this
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// CHECK_CASES_COUNT: function=dense count=10
// CHECK_IF_COUNT: function=dense count=0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// CHECK_CASES_COUNT: function=foo count=9
// CHECK_IF_COUNT: function=foo count=0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// CHECK_CASES_COUNT: function=sparse count=3
// CHECK_IF_COUNT: function=sparse count=0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// CHECK_CASES_COUNT: function=exhaustive count=3
// CHECK_IF_COUNT: function=exhaustive count=0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// CHECK_CASES_COUNT: function=foo count=3
// CHECK_IF_COUNT: function=foo count=0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// CHECK_CASES_COUNT: function=foo count=4
// CHECK_IF_COUNT: function=foo count=1
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
var x = 0
fun inc(): Int {
x++
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
var subjectEvaluated = 0
fun String.foo() = length.also { ++subjectEvaluated }
@@ -1,6 +1,5 @@
// !LANGUAGE: +VariableDeclarationInWhenSubject
// WITH_RUNTIME
// IGNORE_BACKEND: JS_IR
fun dense(x: Int): Int {
return when (val xx = x) {
@@ -1,6 +1,5 @@
// !LANGUAGE: +VariableDeclarationInWhenSubject
// WITH_RUNTIME
// IGNORE_BACKEND: JS_IR
fun sparse(x: Int): Int {
return when (val xx = (x % 4) * 100) {