JS: fix translation of enum entries without parentheses that call secondary constructors, constructors with default parameters and varargs. See KT-15900, KT-14097

This commit is contained in:
Alexey Andreev
2017-01-25 17:39:15 +03:00
parent 0f87320f9e
commit 1c8478e46b
7 changed files with 16 additions and 54 deletions
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: JS
enum class Test(vararg xs: Int) {
OK;
val values = xs
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JS
// see KT-14097
enum class Test(val x: Int, val str: String) {
OK;
constructor(x: Int = 0) : this(x, "OK")
@@ -1,6 +1,3 @@
// IGNORE_BACKEND: JS
// see KT-14097
enum class Test(val x: Int, val str: String) {
OK;
constructor(vararg xs: Int) : this(xs.size + 42, "OK")
@@ -1,6 +1,3 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
package test
enum class My(val s: String) {