fix(angular): fix 7 compiler divergences from Angular reference#26
Merged
Brooooooklyn merged 1 commit intomainfrom Feb 22, 2026
Merged
fix(angular): fix 7 compiler divergences from Angular reference#26Brooooooklyn merged 1 commit intomainfrom
Brooooooklyn merged 1 commit intomainfrom
Conversation
1. Add missing @switch validation: report errors for non-block children, enforce exactly one @case parameter, single @default, and no @default parameters 2. Carry viewport trigger options through ingest into DeferOnOp IR 3. Change generateArrowFunctions phase to Kind::Both with host support 4. Add view.functions traversal to next_context_merging phase 5. Emit null arg for unresolved target slots in defer reify (viewport, interaction, hover triggers) 6. Add debug_assert for unexpected multi-line arrow functions Item 5 from the review (@switch @default reorder) was verified as a false positive: Angular does reorder @default last, just not in ingestSwitchBlock — the generateConditionalExpressions phase splices @default out as the ternary fallback. The existing Rust reorder is correct; updated the doc comment to explain why. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e424f2b to
84845ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

enforce exactly one @case parameter, single @default, and no @default
parameters
interaction, hover triggers)
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Note
Medium Risk
Touches multiple compilation phases and changes emitted instruction arguments and validation behavior; while well-scoped with tests/snapshots, it can subtly affect generated output and compatibility across templates/host bindings.
Overview
Improves Angular-compatibility by tightening
@switchparsing: non-@case/@defaultchildren now error,@casemust have exactly one parameter, and@defaultis limited to one block with no parameters; new tests cover these validations.Adjusts codegen/IR to better match Angular output:
@switchingestion now explicitly reorders the@defaultgroup to the end for consistent slot/function naming, viewport defer triggers now carryoptionsthrough IR, and defer trigger reify always emits a first argument (slotornull) for viewport/interaction/hover (updating snapshots likeɵɵdeferOnViewport(null)).Extends pipeline behavior to host compilation and arrow-function internals:
generateArrowFunctionsnow runs for both template and host jobs (new host variant), multi-line template arrow functions are debug-asserted as impossible, andmergeNextContextExpressionsnow also traverses arrow-functionopslists viaview.functions.Written by Cursor Bugbot for commit 84845ee. This will update automatically on new commits. Configure here.