dd264cff50
In this commit we have a lot of change in test data. This was caused by the way where we evaluate constants. We split constant evaluation into two distinct parts: only necessary evaluations for `fir2ir` (like const val and annotations) and optimizations for lowering. Now we don't do all constant evaluation on `fir2ir`, but IR dump is executed after this phase, so test data changed. #KT-58923
20 lines
563 B
Kotlin
Vendored
20 lines
563 B
Kotlin
Vendored
// TARGET_BACKEND: JVM_IR
|
|
// TODO enable for JS, Native when const lowering is applied in corresponding backends
|
|
// WITH_STDLIB
|
|
|
|
object Test {
|
|
fun foo(): String = "foo " + this
|
|
|
|
fun bar(): String = "<!EVALUATED("bar ")!>bar <!>$this"
|
|
|
|
fun baz(): String = "baz " + this.toString()
|
|
}
|
|
|
|
// STOP_EVALUATION_CHECKS
|
|
fun box(): String {
|
|
if (!Test.foo().startsWith("foo ")) return "Fail ${Test.foo()}"
|
|
if (!Test.bar().startsWith("bar ")) return "Fail ${Test.bar()}"
|
|
if (!Test.baz().startsWith("baz ")) return "Fail ${Test.baz()}"
|
|
return "OK"
|
|
}
|