Skip to content

Comparison of special values is incorrect #196

@adazem009

Description

@adazem009
Value a(Value::SpecialValue::NaN);
Value b(Value::SpecialValue::NaN);

bool eq = (a == b); // false

Expected behavior:

bool eq = (a == b); // true

Value::operator==() should return true if the types are the same if both are special types (infinity, negative infinity or NaN).
Special types are negative numbers when converted to integers (see the Type enum).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Priority: MediumbugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions