From 2ac30c89d00983bd49923fd94d015d2940397ef2 Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Mon, 9 Dec 2024 16:46:36 +0200 Subject: [PATCH] Admit containers as spread arguments --- src/parser/expression.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parser/expression.ts b/src/parser/expression.ts index f99435e..9ef5e9c 100644 --- a/src/parser/expression.ts +++ b/src/parser/expression.ts @@ -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); }