Skip to content

New lint equivalency fuzzer: swapping '->' and '<-' #3005

@MichaelChirico

Description

@MichaelChirico

One problem with -> is it doesn't share operator precedence rules with <- (edit: that's not precisely true, it's something else about the parser that causes this, but the effect is the same), hence the need to ()-wrap here:

(function(x) {
  x
}) -> foo

It will also require a tiny bit of ingenuity to swap the AST entries vs. the simple cases like @↔️$, but comment injection was similarly nontrivial.

We can try it out and if there's too much nofuzz required we can give it up.

Originally posted by @MichaelChirico in #2191

Still, I suspect this will turn up some good true positive issues where we assume assignment is always <- or =, so I'm earmarking it for future work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lint-fuzzingIssues related to the lint fuzzing test sutietesting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions