[JS IR BE] Use Char boxing rules of current backend
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1283
|
||||
// EXPECTED_REACHABLE_NODES: 1276
|
||||
class A(val x: Char)
|
||||
|
||||
fun typeOf(x: dynamic): String = js("typeof x")
|
||||
|
||||
val expectedCharRepresentationInProperty = if (testUtils.isLegacyBackend()) "object" else "number"
|
||||
|
||||
fun box(): String {
|
||||
val a = A('0')
|
||||
|
||||
var r = typeOf(a.asDynamic().x)
|
||||
if (r != "object") return "fail1: $r"
|
||||
if (r != expectedCharRepresentationInProperty) return "fail1: $r"
|
||||
|
||||
r = typeOf(a.x)
|
||||
if (r != "number") return "fail2: $r"
|
||||
|
||||
Reference in New Issue
Block a user