x/tools/container/intsets: UnionWith wrong return value in case of x ⊂ s #50352
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
With container/intsets, call
with special case x ⊂ s
=> returns true
What did you expect to see?
Documentation of UnionWith states:
// UnionWith sets s to the union s ∪ x, and reports whether s grew.
However, with x ⊂ s; s won't change, and UnionWith therefore should return false.
What did you see instead?
s.UnionWith(x) returns true in case of x ⊂ s
File sparse.go, line 638ff should probably look something like this:
The text was updated successfully, but these errors were encountered: