Remove -Xnormalize-constructor-calls

Constructor call normalization is enabled by default since 1.3.
This commit is contained in:
Alexander Udalov
2021-09-02 02:09:18 +02:00
parent cc3ad73436
commit 1864716c83
36 changed files with 83 additions and 400 deletions
@@ -0,0 +1,40 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
fun box(): String {
Foo(
logged("i", listOf(1, 2, 3).map { it + 1 }.first()),
logged("j",
Foo(
logged("k", listOf(1, 2, 3).map { it + 1 }.first()),
null
)
)
)
val result = log.toString()
if (result != "ik<clinit><init>j<init>") return "Fail: '$result'"
return "OK"
}
// FILE: util.kt
val log = StringBuilder()
fun <T> logged(msg: String, value: T): T {
log.append(msg)
return value
}
// FILE: Foo.kt
class Foo(i: Int, j: Foo?) {
init {
log.append("<init>")
}
companion object {
init {
log.append("<clinit>")
}
}
}