Skip to content

Commit ec5ff32

Browse files
committed
[js] Boxing int64 and uint64 when returning them
1 parent 21b7d3c commit ec5ff32

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vm/js/Compiler.nqp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,9 @@ class QAST::CompilerJS does DWIMYNameMangling does SerializeOnce {
636636
if $got == $T_VOID {
637637
return Chunk.new($T_RETVAL, "nqp.Null", $chunk);
638638
}
639+
if $got == $T_INT64 || $got == $T_UINT64 {
640+
return Chunk.new($T_RETVAL, "nqp.int64ToObj(HLL, {$chunk.expr})", $chunk);
641+
}
639642
}
640643

641644
if $desired == $T_CALL_ARG {

0 commit comments

Comments
 (0)