Skip to content

10$: Warn on let ({x} = y); #1203

@strager

Description

@strager

Before refactor:

let x;
({x} = y);

After refactor:

let ({x} = y);  // Bug! This uses an undeclared variable 'x' and calls a function named 'let'.

Conditions for this diagnostic:

  • Function call with a variable let as the callee.
  • Exactly one function argument.
  • Function argument is an assignment expression with =.
  • Function argument's left-hand side is an object literal.

Metadata

Metadata

Assignees

Labels

for hireGet paid for working on this task: https://quick-lint-js.com/hiring.htmlgood first issueGood for newcomers and C++ beginners

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions