-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Code used inside ICU expressions is not fully type safe/checked. #39064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can confirm that this is happening. |
@petebacondarwin I almost have a fix :P |
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. Fixes angular#39064
I opened a PR but it may need some discussion about needing a strictness flag for backwards compatibility and incremental adoption. Edit: a quick look at View Engine makes me believe that it did do ICU type checking if |
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. Fixes angular#39064
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. Fixes angular#39064
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. Fixes angular#39064
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. Fixes angular#39064
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. Fixes angular#39064
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. BREAKING CHANGE: Expressions within ICUs are now type-checked again, fixing a regression in Ivy. This may cause compilation failures if errors are found in expressions that appear within an ICU. Please correct these expressions to resolve the type-check errors. Fixes angular#39064
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Is this a regression?
Not sure.
Description
Component:
Code
Expected behavior:
Both examples must fail with the message "Object is possibly 'undefined'".
Actual behavior:
No errors for
{value.a.v, plural, other {...}}
.🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-ivy-kinrts?file=src%2Fapp%2Fapp.component.html
🌍 Your Environment
The text was updated successfully, but these errors were encountered: