From 33d04ba18db4f9be7c1154aa398692115117677e Mon Sep 17 00:00:00 2001 From: Leon Mika Date: Sun, 18 May 2025 07:27:57 +1000 Subject: [PATCH] Fixed bug involving what was being set --- ucl/eval.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ucl/eval.go b/ucl/eval.go index 4f6894f..ae71896 100644 --- a/ucl/eval.go +++ b/ucl/eval.go @@ -79,7 +79,7 @@ func (e evaluator) evalCmd(ctx context.Context, ec *evalCtx, currentPipe Object, return nil, err } - return e.assignDot(ctx, ec, ast.Assign, assignVal) + return e.assignDot(ctx, ec, ast.Name, assignVal) case (ast.Name.Arg.Ident != nil) && len(ast.Name.DotSuffix) == 0: name := ast.Name.Arg.Ident.String() @@ -184,12 +184,12 @@ func (e evaluator) evalDot(ctx context.Context, ec *evalCtx, n astDot) (Object, return res, nil } -func (e evaluator) assignDot(ctx context.Context, ec *evalCtx, n *astDot, toVal Object) (Object, error) { +func (e evaluator) assignDot(ctx context.Context, ec *evalCtx, n astDot, toVal Object) (Object, error) { if len(n.DotSuffix) == 0 { return e.assignArg(ctx, ec, n.Arg, toVal) } - panic("TODO") + return nil, errors.New("TODO") } func (e evaluator) evalArg(ctx context.Context, ec *evalCtx, n astCmdArg) (Object, error) {