Commit 66601b7
test(paths): pin declaration-order tie-breaking between equal-prefix patterns
Third self-review pass, verified against the pinned typescript-go source:
module.MatchPatternOrExact consults the exact-string set before any wildcard,
and core.FindBestPatternMatch displaces the best match only on a strictly
greater prefix length — so between wildcards with identical literal prefixes
the first declared pattern wins. orderPatterns already reproduces this via
SliceStable; this locks the observable contract so an unstable sort or a >=
comparison cannot silently diverge from the type checker on order-sensitive
configs.
Refs #310.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AivFfPoUxoU26Dko5Jbm211 parent 98d229d commit 66601b7
1 file changed
Lines changed: 41 additions & 0 deletions
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments