Skip to content

Commit

Permalink
fixup! function/stdlib: LengthFunc precise handling of marks
Browse files Browse the repository at this point in the history
  • Loading branch information
alisdair committed Apr 20, 2021
1 parent 8afdb0c commit 6d3de8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cty/function/stdlib/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ var LengthFunc = function.New(&function.Spec{
return cty.Number, nil
},
Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) {
// remove and re-apply top-level marks only
collection, marks := args[0].Unmark()
return collection.Length().WithMarks(marks), nil
return args[0].Length(), nil
},
})

Expand Down

0 comments on commit 6d3de8f

Please sign in to comment.