Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler] Make unary and binary operator types more precise #29880

Merged
merged 1 commit into from
Jun 12, 2024

Commits on Jun 12, 2024

  1. [compiler] Make unary and binary operator types more precise

    Summary: Minor change inspired by #29863: the BuildHIR pass ensures that Binary and UnaryOperator nodes only use a limited set of the operators that babel's operator types represent, which that pr relies on for safe reorderability, but the type of those HIR nodes admits the other operators. For example, even though you can't build an HIR UnaryOperator with `delete` as the operator, it is a valid HIR node--and if we made a mistaken change that let you build such a node, it would be unsafe to reorder.
    
    This pr makes the typing of operators stricter to prevent that.
    
    [ghstack-poisoned]
    mvitousek committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    1c8cb1b View commit details
    Browse the repository at this point in the history