Commit 6b33a9c
gh-153044: Note the flag-context invariant of the complement rule
Unicode \w and ascii \W overlap, so a category and its complement are
only disjoint within one flag context; this holds because the walk
never compares atoms across a flag-scoping boundary. Add tests pinning
that (?a:\w+)\W and \w+(?a:\W) are not possessified, while \w+\W and
(?a:\w+\W) are.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent c6b58ec commit 6b33a9c
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
648 | 651 | | |
649 | 652 | | |
650 | 653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3102 | 3102 | | |
3103 | 3103 | | |
3104 | 3104 | | |
| 3105 | + | |
3105 | 3106 | | |
3106 | 3107 | | |
3107 | 3108 | | |
| |||
3113 | 3114 | | |
3114 | 3115 | | |
3115 | 3116 | | |
| 3117 | + | |
| 3118 | + | |
3116 | 3119 | | |
3117 | 3120 | | |
3118 | 3121 | | |
| |||
0 commit comments