Skip to content

Fix forward progress detection for lookaround groups#866

Merged
natecook1000 merged 1 commit into
swiftlang:mainfrom
ekassos:lookaround-forward-progress-fix
Jul 21, 2026
Merged

Fix forward progress detection for lookaround groups#866
natecook1000 merged 1 commit into
swiftlang:mainfrom
ekassos:lookaround-forward-progress-fix

Conversation

@ekassos

@ekassos ekassos commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

When a quantified concatenation begins with a lookaround group, the forward progress checker fails to skip over the assertion's child subtree, leaving the analysis cursor misaligned and leading to false positives.

This change skips the lookaround's child subtree, matching the treatment added for nullable quantifications in #851.

Fixes #865.

When a quantified concatenation begins with a lookaround group, the forward
progress checker fails to skip over the assertion's child subtree, leaving the
analysis cursor misaligned and leading to false positives.

This change skips the lookaround's child subtree, matching the treatment added
for nullable quantifications in swiftlang#851.
@natecook1000

Copy link
Copy Markdown
Member

@swift-ci Please test Linux platform

@natecook1000
natecook1000 merged commit d4887c5 into swiftlang:main Jul 21, 2026
24 checks passed
@natecook1000

Copy link
Copy Markdown
Member

Thanks for this fix, @ekassos!

@ekassos
ekassos deleted the lookaround-forward-progress-fix branch July 21, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RegexBuilder infinite loop when nullable capture starts with NegativeLookahead

2 participants