Skip to content

function/stdlib: SetSymmetricDifferenceFunc is actually SetSubtractFunc #27

@apparentlymart

Description

@apparentlymart

Due to what I assume was a copy-paste error, the SetSymmetricDifferenceFunc seems to actually be implementing SetSubtractFunc due to calling the wrong method on the underlying set implementation.

var SetSymmetricDifferenceFunc = function.New(&function.Spec{
Params: []function.Parameter{
{
Name: "first_set",
Type: cty.Set(cty.DynamicPseudoType),
AllowDynamicType: true,
},
},
VarParam: &function.Parameter{
Name: "other_sets",
Type: cty.Set(cty.DynamicPseudoType),
AllowDynamicType: true,
},
Type: setOperationReturnType,
Impl: setOperationImpl(func(s1, s2 cty.ValueSet) cty.ValueSet {
return s1.Subtract(s2)
}),
})

There are also no unit tests for either SetSubtractFunc or SetSymmetricDifferenceFunc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions