You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 11, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 11, 2026. It is now read-only.
incorrect diagnostic: using a '.' after a '?.' might fail #1192
quick-lint reports: using a '.' after a '?.' might fail, since '?.' might return 'undefined'., however this is not true.
Running the above code shows that optional chaining short-circuits the entire property access expression to undefined, not just the first property access.
❯ deno
Deno 1.39.4
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> undefined?.a.b.c.d
undefined
idk if there's a "correct" version of this diagnostic, or if we should just delete the whole thing
Activity
vegerot commentedon Jan 23, 2024
A better version of this diagnostic would be to check for non-null assertions, which are incorrect.
feat: new diag for using ‘.’ after ‘?.’
strager commentedon Jan 25, 2024
Fixed in Git commit 434d085. I will ship the fix in version 3.2.0.
strager commentedon Mar 4, 2024
Fix released in version 3.2.0.