Skip to content

fix(angular): fix 3 compiler divergences from Angular reference#30

Merged
Brooooooklyn merged 1 commit into
mainfrom
fix/angular-case-default-divergences
Feb 23, 2026
Merged

fix(angular): fix 3 compiler divergences from Angular reference#30
Brooooooklyn merged 1 commit into
mainfrom
fix/angular-case-default-divergences

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

@Brooooooklyn Brooooooklyn commented Feb 23, 2026

  1. Standalone @case/@default blocks now produce "Unrecognized block" error
    and UnknownBlock node instead of being silently dropped.
  2. @case blocks with extra parameters now report error but still parse
    using the first parameter, matching Angular's error recovery behavior.
  3. Unexpected i18n metadata types on conditional blocks now panic with a
    descriptive message instead of being silently ignored.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


Note

Medium Risk
Changes compiler ingestion/transform behavior for control-flow blocks and i18n metadata; risk is mainly around altered error recovery and diagnostics potentially affecting generated IR for edge-case templates.

Overview
Aligns Angular control-flow parsing with upstream error recovery: standalone @case/@default now emit an "Unrecognized block" diagnostic and produce an UnknownBlock node instead of being dropped, and @case with extra parameters now reports an error but still parses using the first parameter.

Improves i18n robustness in ingest.rs by validating conditional-block i18n metadata types and emitting a diagnostic when unexpected types are encountered (rather than silently ignoring). Adds/updates tests to cover the new @switch and standalone block behaviors, plus several small refactors/borrow/move cleanups in html_to_r3.rs.

Written by Cursor Bugbot for commit f36065c. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Brooooooklyn Brooooooklyn changed the title fix(angular): fix 3 compiler divergences from Angular reference (#30) fix(angular): fix 3 compiler divergences from Angular reference Feb 23, 2026
Brooooooklyn added a commit that referenced this pull request Feb 23, 2026
1. Standalone @case/@default blocks now produce "Unrecognized block" error
   and UnknownBlock node instead of being silently dropped.
2. @case blocks with extra parameters now report error but still parse
   using the first parameter, matching Angular's error recovery behavior.
3. Unexpected i18n metadata types on conditional blocks now panic with a
   descriptive message instead of being silently ignored.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Brooooooklyn Brooooooklyn force-pushed the fix/angular-case-default-divergences branch from 494f3bd to a71e928 Compare February 23, 2026 02:50
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread crates/oxc_angular_compiler/src/pipeline/ingest.rs
1. Standalone @case/@default blocks now produce "Unrecognized block" error
   and UnknownBlock node instead of being silently dropped.
2. @case blocks with extra parameters now report error but still parse
   using the first parameter, matching Angular's error recovery behavior.
3. Unexpected i18n metadata types on conditional blocks now panic with a
   descriptive message instead of being silently ignored.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Brooooooklyn Brooooooklyn force-pushed the fix/angular-case-default-divergences branch from a71e928 to f36065c Compare February 23, 2026 03:45
@Brooooooklyn Brooooooklyn merged commit 8bd38e1 into main Feb 23, 2026
4 checks passed
@Brooooooklyn Brooooooklyn deleted the fix/angular-case-default-divergences branch February 23, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant