Skip to content

fix(angular): emit localRefs and templateRefExtractor for conditional create instructions#35

Merged
Brooooooklyn merged 1 commit intomainfrom
fix/angular-conditional-local-refs
Feb 24, 2026
Merged

fix(angular): emit localRefs and templateRefExtractor for conditional create instructions#35
Brooooooklyn merged 1 commit intomainfrom
fix/angular-conditional-local-refs

Conversation

@Brooooooklyn
Copy link
Member

@Brooooooklyn Brooooooklyn commented Feb 24, 2026

Angular's conditionalCreate and conditionalBranchCreate instructions support
localRefs arguments (refs index + templateRefExtractor) when local template
references are present. The Rust implementation was missing this, silently
dropping the local_refs_index that the local_refs phase had already computed.

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


Note

Low Risk
Small, localized change to emitted argument lists for conditional create instructions; risk is mainly limited to potential runtime signature mismatch if ordering/null-trimming differs from Angular.

Overview
Fixes control-flow create instruction generation so @if/@switch branches no longer drop local template references.

create_conditional_create_stmt and create_conditional_branch_create_stmt now accept local_refs_index and, when set, append the refs const index plus i0.ɵɵtemplateRefExtractor to match Angular’s instruction signatures; reify/mod.rs is updated to pass the computed local_refs_index through. Adds unit tests asserting both the presence and omission of these arguments depending on whether local refs exist.

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

… create instructions

Angular's conditionalCreate and conditionalBranchCreate instructions support
localRefs arguments (refs index + templateRefExtractor) when local template
references are present. The Rust implementation was missing this, silently
dropping the local_refs_index that the local_refs phase had already computed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Member Author

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

@Brooooooklyn Brooooooklyn merged commit 9feb2a8 into main Feb 24, 2026
4 checks passed
@Brooooooklyn Brooooooklyn deleted the fix/angular-conditional-local-refs branch February 24, 2026 08:40
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