Commit 9aa2248
committed
fix: unwrap empty source expressions during association resolution
Symptom: resolveAssociationPaths could return a SourceExpr wrapper with an
empty Source field after resolving the inner expression.
Root cause: the SourceExpr branch rebuilt the wrapper even when there was no
source text to preserve. That made the wrapper semantically redundant and left
future callers dependent on expressionToString peeling it away.
Fix: keep non-empty SourceExpr values verbatim for whitespace-preserving
roundtrips, but unwrap empty SourceExpr values to the resolved inner expression.
Tests: make build; focused SourceExpr association-resolution tests; make test.1 parent 38d28b9 commit 9aa2248
2 files changed
Lines changed: 39 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
518 | 552 | | |
519 | 553 | | |
520 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
334 | 338 | | |
335 | 339 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
0 commit comments