zclconf / go-cty

A type system for dynamic values in Go applications
MIT License
338 stars 70 forks source link

function/stdlib: SetSymmetricDifferenceFunc is actually SetSubtractFunc #27

Open apparentlymart opened 4 years ago

apparentlymart commented 4 years ago

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.

https://github.com/zclconf/go-cty/blob/f21e35a16ffb3077ce7e1598f20d5644dea453a1/cty/function/stdlib/set.go#L88-L105

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

nikpivkin commented 2 weeks ago

@apparentlymart That seems to have been fixed already. https://github.com/zclconf/go-cty/commit/88189cd85df5214d602f29923914df7c2b8353d3