[Wasm] Boolean boxed instances are the same

Fixed #KT-65411
This commit is contained in:
Igor Yakovlev
2024-02-09 17:01:12 +01:00
committed by Space Team
parent a171f774be
commit a5ef668e3c
28 changed files with 190 additions and 7 deletions
@@ -0,0 +1,13 @@
fun boxBoolean(b: Boolean): Any = b
fun box(): String {
if (boxBoolean(true) !== boxBoolean(true)) return "FAIL1"
if (boxBoolean(false) !== boxBoolean(false)) return "FAIL2"
if (boxBoolean(true) === boxBoolean(false)) return "FAIL3"
if (boxBoolean(false) === boxBoolean(true)) return "FAIL4"
if (boxBoolean(true) != boxBoolean(true)) return "FAIL5"
if (boxBoolean(false) != boxBoolean(false)) return "FAIL6"
if (boxBoolean(true) == boxBoolean(false)) return "FAIL7"
if (boxBoolean(false) == boxBoolean(true)) return "FAIL8"
return "OK"
}
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
fun box(): String {
fun a(a: Any) = a === 1.1 is Double
return if (a(true)) "OK" else "Fail"