fix(angular): fix 3 compiler divergences from Angular reference#27
Merged
Brooooooklyn merged 1 commit intomainfrom Feb 22, 2026
Merged
fix(angular): fix 3 compiler divergences from Angular reference#27Brooooooklyn merged 1 commit intomainfrom
Brooooooklyn merged 1 commit intomainfrom
Conversation
1. @for duplicate `let` validation: Remove extra `name != value` condition that skipped implicit context variables, causing `let $index = $index` to be silently accepted instead of rejected as a duplicate. 2. $index alias handling: Change `RepeaterVarNames.index` from `Option<Atom>` to `Vec<Atom>` so multiple aliases for $index (e.g. `let i = $index, j = $index`) are all stored and rewritten in track expressions, matching Angular's `Set<string>` behavior. 3. @switch invalid @case unknown_blocks: Push invalid @case blocks (wrong parameter count) into `unknown_blocks` before continuing, matching Angular's behavior for language service autocompletion support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

@for duplicate
letvalidation: Remove extraname != valueconditionthat skipped implicit context variables, causing
let $index = $indexto be silently accepted instead of rejected as a duplicate.
$index alias handling: Change
RepeaterVarNames.indexfromOption<Atom>to
Vec<Atom>so multiple aliases for $index (e.g.let i = $index, j = $index) are all stored and rewritten in track expressions, matchingAngular's
Set<string>behavior.@switch invalid @case unknown_blocks: Push invalid @case blocks (wrong
parameter count) into
unknown_blocksbefore continuing, matchingAngular's behavior for language service autocompletion support.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Note
Medium Risk
Touches control-flow transform and repeater track-expression rewriting, which can change generated output and error surfaces for
@for/@switchtemplates. Changes are narrow and covered by new regression tests.Overview
Aligns
@forparsing/ingestion with Angular by treating any repeatedletname as a duplicate (including implicit context vars like$index), so invalid declarations now error instead of being accepted.Fixes repeater
$indexalias tracking by storing all aliases (not just one) and using them when rewritingtrackexpressions, ensuring multiple$indexaliases are correctly transformed.Updates
@switchtransformation so invalid@caseblocks (wrong parameter count) are still recorded inunknown_blocksbefore being skipped, matching Angular’s language-service behavior. Adds focused regression tests for these cases.Written by Cursor Bugbot for commit e5c6964. This will update automatically on new commits. Configure here.