Skip to content

Number matching too strict in FluentValue::matches #401

Description

@slatian

The FluentValue::matches function is used to implement select statements, however, when a number meets a number the two are compared with a == b on the whole FluentNumber struct where the eq() is a #[derive(PartialEq)] which results in a mismatch once one of the options is set differently making select statements against configured fluent numbers with number literals not match.

Numbers are only compared by value in the javascript version which is the behavior I'd expect from reading the syntax guide.

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