-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
Incorrect reference flags for x++
and x--
#3326
Comments
This seems to be intentional oxc/crates/oxc_semantic/src/lib.rs Lines 273 to 277 in e4b3a3c
Same behavior in oxc/crates/oxc_linter/src/rules/eslint/no_unused_private_class_members.rs Lines 331 to 337 in e4b3a3c
But I think Does this make sense? |
Hmm. I'm not clear what these flags are meant to represent now! These are all (broadly) equivalent: x = x + 1; // Read + Write
x += 1; // Read | Write
x++; // Write
++x; // Write NB: Also depends on what This also seems to be inconsistent - it flags let x = 1;
let y = x = 2; And something strange going on here - the addition of console.log;
let x = 1;
x++; |
The
Yes! I forgot the
This case is correct.
This is a bug! I will fix it. |
Here, x should be marked as Please refer to: |
x += 1
gets correctly flagged asRead | Write
. But all the rest (x++
etc) are flagged as justWrite
. This appears to be incorrect.playground
The text was updated successfully, but these errors were encountered: