Repository navigation
bitwise_ops: a >> closing a generic list is not a shift (Java, Rust, TypeScript, C#) - #8901
Merged
Merged
Conversation
…TypeScript, C#) (Closes #8866) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
Contributor
|
No description provided. |
1 similar comment
Contributor
|
No description provided. |
…asters Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8866
What changed
The
bitwise_opsshift pattern in Java, Rust, TypeScript and C# counted the>>that closes a nested generic list (Map<String, List<String>>) as a right shift. The>>/>>>alternative now counts only after whitespace,)or](a >> 2), or between two word characters (a>>2).>>=keeps counting. A>>after a word character and followed by a space,(,,,;or{is a generic close and no longer counts.New test:
tests/extraction/languages/test_bitwise_generics_8866.py(nested generics score 0, real shifts score as before, in all four languages; Java>>>).Class / Sibling gaps
Class: a
bitwise_opsrule whose shift alternative cannot tell a closing generic>>from a shift. Handled here: Java, Rust, TypeScript, C#. C++ has no bare>>alternative (only>>=), Kotlin and Python have no such alternative, and Go has no nested generic>>: none of them is affected.Sibling gaps (no burned-estate program needs any; all are core engine, not frontier):
>>hazard, one-line fix of this shape: Swift, Scala, Dart, Apex, Zig.&and|not counted (recall): C, Python, Rust, Java. This needs a per-language design to avoid&&,||,&mut, closure|x|and type unions.Golden / rosetta
Golden masters re-blessed through
golden-lock.sh crucible_check.py --update --yes. Every mismatch listed is in the Java, Rust or TypeScript corpus, and the groovy corpus's.javafiles (scanned with the Java rule). Bitwise Operations counts drop, for example the groovy corpus'sDefaultProject.javagoes 5 -> 0. A control run was not needed: drift is limited to the signal changed.rosetta:rebless-owed: keyword-rosetta bitwise_ops counts will move for these four languages. CPU timing was not measured separately; the change adds two lookarounds to an alternation of single characters, with no unbounded quantifier.Gates:
pr_gates --fast9/9,--ratchets9 pass / 0 fail, strict suites for the four languages green (464 tests).🤖 Generated with Claude Code