Constructor call normalization mode depends on language version

This commit is contained in:
Dmitry Petrov
2018-07-26 15:40:11 +03:00
parent 14b1f0ef6a
commit 566b5856ec
18 changed files with 66 additions and 19 deletions
@@ -1,3 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,3 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,3 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// TARGET_BACKEND: JVM
// WITH_RUNTIME
inline fun ok(): String {
@@ -1,3 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,3 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,3 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
@@ -0,0 +1,15 @@
// !LANGUAGE: +NormalizeConstructorCalls
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
open class A(val s: String)
inline fun test(crossinline z: () -> String): String {
return object : A(listOf(1).map { it.toString() }.joinToString()) {
val value = z()
}.value
}
fun box(): String {
return test { "OK" }
}
@@ -1,3 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,3 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt