Skip to content

Number matching too strict in FluentValue::matches #401

@slatian

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions