[JS IR] Explicitly convert Long values to String in string concatenation
#KT-39891 Fixed
This commit is contained in:
+7
-5
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// EXPECTED_REACHABLE_NODES: 1378
|
||||
package foo
|
||||
@@ -11,9 +9,13 @@ fun box(): String {
|
||||
if (" ${x.toLong() as Number}" != " $x") return "FAIL 3"
|
||||
if (" ${x.toLong() as Any}" != " $x") return "FAIL 4"
|
||||
if (" ${x.toLong() as Long?}" != " $x") return "FAIL 5"
|
||||
if (" ${x.toLong() as Comparable<Long>?}" != " $x") return "FAIL 6"
|
||||
if (" ${x.toLong() as Number?}" != " $x") return "FAIL 7"
|
||||
if (" ${x.toLong() as Any?}" != " $x") return "FAIL 8"
|
||||
if (" ${null as Long?}" != " null") return "FAIL 6"
|
||||
if (" ${x.toLong() as Comparable<Long>?}" != " $x") return "FAIL 7"
|
||||
if (" ${null as Comparable<Long>?}" != " null") return "FAIL 8"
|
||||
if (" ${x.toLong() as Number?}" != " $x") return "FAIL 9"
|
||||
if (" ${null as Number?}" != " null") return "FAIL 10"
|
||||
if (" ${x.toLong() as Any?}" != " $x") return "FAIL 11"
|
||||
if (" ${null as Any?}" != " null") return "FAIL 12"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user