Repository navigation
GROOVY-12694: keep closed-paren fixtures pointed at a real syntax error - #3247
Merged
daniellansun merged 1 commit intoNov 6, 2026
Merged
Conversation
GROOVY-12641 accepts `case Type name ->` as a type pattern, so the two ParserNegativeSyntaxTest scripts that used that form as their later syntax error now parse. expectParseError then fails with "expected parse to fail", which is the only red on Build-and-test. Those scripts are the check that a paren group the parser has already closed is not reported as a missing ')'. The type-pattern labels stay, and each script now ends in `def y = 1 +`, the same dangling operator the method-parameter and parenthesised-call cases already use. That is still a recognition failure, so a closed record header or for header ahead of it must not move the caret.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3247 +/- ##
==================================================
+ Coverage 74.2207% 74.3409% +0.1202%
- Complexity 43914 44304 +390
==================================================
Files 1692 1699 +7
Lines 149911 150855 +944
Branches 28466 28754 +288
==================================================
+ Hits 111265 112147 +882
+ Misses 28444 28435 -9
- Partials 10202 10273 +71 🚀 New features to boost your workflow:
|
This was referenced Nov 6, 2026
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.
Summary
GROOVY-12641 (GEP-19) accepts
case Type name ->as a type pattern. TwoParserNegativeSyntaxTestfixtures that used that form as their later syntax error therefore began to parse, soexpectParseErrorfailed with "expected parse to fail" — the only reds on Build-and-test across the CI matrix.Those scripts exist to prove that a paren group the parser has already closed is not reported as a missing
). The type-patterncaselabels stay; each script now ends indef y = 1 +, the same dangling operator already used by the method-parameter and parenthesised-call cases. That is still a recognition failure, so a closed record header orforheader ahead of it must not move the caret.Change
ParserNegativeSyntaxTest.groovydef y = 1 +Related