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 }}
Repository navigation
javascript func_start/args parse 'with (x) {}' as a function named 'with' #2539
Found by the #1096 control corpus (javascript reference folder): with (shape) {} is
counted by javascript func_start (and args) as a function named with.
Evidence
data/javascript/b.js has exactly 3 function declarations plus one with (shape) {}
statement; observed func_start = 4 / args = 4. finditer on the func_start rule returns ['function probeBypass', 'with', 'function probeTelemetry', 'function probeState'].
Cause
The identifier (args) { alternation excludes if|for|while|switch|catch|return but not with (nor do). switch (flag) {} in the same corpus is correctly excluded; with just
isn't in the list.
Fix shape
Add with (and audit for other statement keywords that can precede (...) { — do can't,
but dialect keywords might) to the exclusion in both the func_start and args alternations.
Low blast radius; strict-mode code can't even use with, so real-corpus impact is small
but the fix is cheap and the tri-comparison ledger precedent says exclusions belong in the
regex, not in verdicts.
Activity
fix(dag): scope #2540's case-fold to the importing language's own fil…
fix(core-engine): Rosetta corpus sweep — six extraction/DAG/recorder …