Skip to content

Commit

Permalink
Admit containers as spread arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
frostburn committed Dec 9, 2024
1 parent 2c36329 commit 2ac30c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parser/expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ export class ExpressionVisitor {
const result: SonicWeavePrimitive[] = [];
for (const arg of args) {
if (arg.spread) {
result.push(...(this.visit(arg.expression) as SonicWeavePrimitive[]));
const array = containerToArray(this.visit(arg.expression), 'of');
result.push(...array);
} else {
result.push(this.visit(arg.expression) as SonicWeavePrimitive);
}
Expand Down

0 comments on commit 2ac30c8

Please sign in to comment.