Closed edef1c closed 6 years ago
It's an optimization. f ...[a, b]
is unrolled to f a, b
pre-compile.
A mis-optimisation, though? One of them calls a function with a single array argument, the other calls a function with multiple arguments.
.apply takes an array of arguments.
coco:
f ...[x for x of [1, 2, 3]]
expected compilation:actual compilation:
f ...([x for x of [1, 2, 3]])
compiles to the correct JS.