Commit c922479
mforce
fix(#417): codex round 104 — default(T) operands inside literal chains
default(string) is null and contributes an empty string to a
concatenation, but the gap checker recognized only the literal null
keyword, so the fold broke at `default`. The gap now consumes a
word-bounded `default` followed by a balanced type-paren (reused
TryConsumeTypeParen), folded as an empty contribution.
Deliberately conservative on the type question: a text scan cannot
tell reference types (where default IS null — the actual evasion)
from value types (where it adds text), so ALL default(T) operands are
consumed; a value-type default in a fragment chain folds inexactly
and may refuse absurd-but-harmless code — the same fail-closed stance
as the cast/subtraction ambiguity. Untyped `default` cannot compile
inside a concatenation, so the paren form is required.
Mutation-verified: codex's exact default(string) form and a
default(string?)! variant each failed PostgresImagePin with the
composed-chain refusal; a variable merely NAMED defaultName in the
same gap position passed. Restored, rebuilt, all three
SchemaDocsTests green.1 parent 896cdbe commit c922479
1 file changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
502 | 528 | | |
503 | 529 | | |
504 | 530 | | |
| |||
0 commit comments