Skip to content

RawTreeSet with sometimes use Java .equals() instead of the specified comperator #898

@krame505

Description

@krame505

I discovered when trying to make a Set<Decorated Name> with a compirator of \ n1 n2 -> compare(n1.name, n2.name), that removeAll and difference will sometimes return the wrong result. It seems that the native .equals() method is being used, instead of the specified comparison function. This is not an issue with primitive types which have a Java .equals() matching the Eq/Ord instance, but this is a problem for types with custom a Eq/Ord.

Not sure if there is a good fix for this without impacting performance (which is the point of this library.)

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