Skip to content

[JS/TS] Dictionary and HashSet compare array keys structurally #5165

Open

Description

@shayanhabibi

let d = Dictionary<int[], int>() in d.[[| 1 |]] <- 1; d.ContainsKey [| 1 |] is true (.NET false: the default equality comparer of an array is reference equality; F#'s = is structural, but BCL collections use Equals). Same for HashSet<int[]>. Set and Map are right to compare structurally.

Fickl related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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