[JS IR BE] fix default arguments lowering

This commit is contained in:
Anton Bannykh
2018-10-16 17:45:45 +03:00
parent e9c932260c
commit 3a105debb3
38 changed files with 124 additions and 129 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
enum class A(val a: Int = 1) {
FIRST(),
SECOND(2)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
enum class Foo(val a: Int = 1, val b: String) {
B(2, "b"),
C(b = "b")
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
enum class Foo(val a: Int = 1, val b: String = "a") {
A(),
B(2, "b"),
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
enum class Foo(val a: Double = 1.0, val b: Double = 1.0) {
A(),
B(2.0, 2.0),
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// See KT-21968
interface A {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface Foo {
fun foo(a: Double = 1.0): Double
}
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JVM
// See KT-15971
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface A {
fun visit(a:String, b:String="") : String = b + a
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface Base {
fun bar(a: String = "abc"): String = a + " from interface"
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface I {
fun foo(x: Int = 23): String
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface FooTrait<T> {
fun make(size: Int = 16) : T
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JVM
var log = ""
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
enum class Test(val str: String = "OK") {
OK
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
enum class Test(val str: String = "OK") {
OK {
fun foo() {}
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
enum class ClassTemplate(
// var bug: Int = 1,
var code: Int,
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface A {
fun bar2(arg: Int = 239) : Int
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface A {
fun foo(x: Int, y: Int = x + 20, z: Int = y * 2) = z
}
@@ -1,5 +1,5 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR, JS_IR
// IGNORE_BACKEND: JVM_IR
inline class Z(val z: Int)
+1 -1
View File
@@ -1,5 +1,5 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR, JS_IR
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
inline class Ucn(private val i: UInt)
@@ -1,5 +1,5 @@
// !LANGUAGE: +MultiPlatformProjects
// IGNORE_BACKEND: JVM_IR, JS_IR, NATIVE
// IGNORE_BACKEND: JVM_IR, NATIVE
// FILE: common.kt
expect interface I {
@@ -1,6 +1,5 @@
// !LANGUAGE: +MultiPlatformProjects
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JVM
// FILE: lib.kt
@@ -1,6 +1,5 @@
// !LANGUAGE: +MultiPlatformProjects
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// FILE: lib.kt
expect interface I {
@@ -1,6 +1,5 @@
// !LANGUAGE: +MultiPlatformProjects
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// FILE: lib.kt
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface I {
fun foo(): String = "foo"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface I<T> {
fun foo(x: T): String = "foo($x)"