Skip to content

Value::toBool() returns incorrect values #517

Closed
@adazem009

Description

@adazem009

Correct return values:

NaN -> false
Infinity -> true
-Infinity -> true
any real number except zero -> true
0 -> false

any non-empty string -> true, except:
"0" -> false
"false" -> false

empty string -> false

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Priority: LowbugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions