Skip to content

BitvSet intersect_with has incorrect behavior when called with an empty set #16542

Closed
@kaseyc

Description

@kaseyc

The intersection of a BitvSet with an empty (returned from BitvSet::new()) set is incorrect, as it will return the original set. However, if the arguments are reversed (an empty BitvSet calls intersect_with with some set as a parameter), the correct result is returned.

Additionally, if the set returned by new is modified (e.g. add and remove a value), the correct result will be returned.

Examples:
http://is.gd/Aksaz6
http://is.gd/6zTo9R

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions