Skip to content

treat Infinity and NaN as reserved words #4218

@michaelficarra

Description

@michaelficarra

In the same way we compile undefined to void 0, I think we should compile the identifiers Infinity and NaN to 2e308 and 0/0 respectively. If someone wants to access the values of these global variables, they can do so explicitly via global.undefined, global.Infinity, and global.NaN instead of doing it through scope resolution.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions