Commit 8435daf
fix(angular): use fail-fast error handling for invariant violations and remove panics (#37)
- Make i18n metadata type checks fail-fast (return early) instead of
silently dropping placeholders, matching Angular's throw behavior
- Make unknown @for loop variable checks fail-fast instead of emitting
empty expressions, matching Angular's AssertionError throw
- Add 4 unit tests for the fail-fast behavior
- Replace all panic!/unreachable!/debug_assert! in production code with
diagnostics-style error reporting or safe fallbacks (10 instances)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7828f59 commit 8435daf
File tree
10 files changed
+301
-103
lines changed- crates/oxc_angular_compiler/src
- i18n
- output
- pipeline
- phases
- reify
- styles
10 files changed
+301
-103
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
579 | | - | |
580 | | - | |
| 578 | + | |
581 | 579 | | |
582 | 580 | | |
583 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
1397 | | - | |
| 1392 | + | |
1398 | 1393 | | |
1399 | 1394 | | |
1400 | 1395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
0 commit comments