Closed strager closed 5 months ago
@strager Shouldn't this be considered an error? Code like this crashes in Node.js on line 5:
const y = {x: 45, z: "helloworld"};
let z;
({z} = y);
console.log(z);
let ({x} = y);
console.log(x);
@msharipov This doesn't crash:
const y = {x: 45, z: "helloworld"};
let z;
({z} = y);
console.log(z);
function let(arg) {
console.log("let", arg);
}
let x;
let ({x} = y);
console.log(x);
@strager Ah, I see. Could you please assign this to me?
I claim this for-hire task. I expect payment after I complete this task. I will email the quick-lint-js team if I am assigned this task.
@Nyx1on Someone else already claimed this task. If @msharipov is unresponsive, I'll give the task you @Nyx1on.
I'm still working on this, it's just taking a while.
Before refactor:
After refactor:
Conditions for this diagnostic:
let
as the callee.=
.