[FIR] Add toString() call to expressions in string templates
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun box () : String {
|
||||
val b = 4.toByte()
|
||||
val s = 5.toShort()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun box(): String {
|
||||
var a = 'a'
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun box() : String {
|
||||
val b = 1+1
|
||||
if ("$b" != "2") return "fail"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun f(s: String?): String {
|
||||
return "$s"
|
||||
}
|
||||
@@ -6,4 +5,4 @@ fun f(s: String?): String {
|
||||
fun box(): String {
|
||||
if (f(null) != "null") return "Fail"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun foo(s: Any): String {
|
||||
val x = when (s) {
|
||||
is String -> s
|
||||
@@ -11,6 +10,3 @@ fun foo(s: Any): String {
|
||||
}
|
||||
|
||||
fun box() = if (foo("OK") == "OK" && foo(42) == "42" && foo(true) == "") "OK" else "Fail"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user