Revert "[JS IR] [runtime] Remove valueOf method from Long"
This reverts commit e13b6b2a90.
The significance of the breakage caused by the removal of `valueOf`
was underestimated.
#KT-50202 Open
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1273
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: UNSUPPORTED_JS_INTEROP
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
// Test that APIs expecting Number behave correctly with Long values.
|
||||
|
||||
import kotlin.js.Date
|
||||
|
||||
fun box(): String {
|
||||
assertEquals("1970-01-01T00:00:00.000Z", Date(0L).toISOString())
|
||||
assertEquals("10/4/1995, 12:00:00 AM", Date(1995, 9, 4, 0, 0, 0, 0L).toLocaleString("en-US"))
|
||||
assertEquals(812764800000.0, Date.UTC(1995, 9, 4, 0, 0, 0, 0L))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user