angular/packages/compiler/src/template/pipeline
Kristiyan Kostadinov 8f2874e86d fix(compiler): incorrectly handling let declarations inside i18n (#60512)
The compiler wasn't handling `@let` declarations placed inside i18n blocks. The problem is that `assignI18nSlotDependencies` phase assigns the `target` of i18n ops much earlier than the `@let` optimization. If the `@let` ends up getting optimized because it isn't used in any child views, the pointer in the i18n instruction becomes invalid. This hadn't surfaced so far, because we didn't optimize `declareLet` ops, however once we do, we start hitting assertions that the optimized `declareLet` isn't used anywhere.

These changes resolve the issue by moving the i18n phases after the `@let` optimization.

PR Close #60512
2025-05-13 16:31:38 -07:00
..
ir refactor: add explicit types for exports relying on inferred call return type (#61312) 2025-05-13 22:45:18 +00:00
src fix(compiler): incorrectly handling let declarations inside i18n (#60512) 2025-05-13 16:31:38 -07:00