Skip to content

@let is declared but its value is never read, when using @let in i18n ICU expressions #57838

@keatkeat87

Description

@keatkeat87

Command

other, serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

[WARNING] NG8112: @let gender is declared but its value is never read. [plugin angular-compiler]

@let gender = 'female';
<h1 i18n>{ gender, select, male {male} female {female} other {other} }</h1>

Minimal Reproduction

ng new test

app.component.html

@let gender = 'female';
<h1 i18n>{ gender, select, male {male} female {female} other {other} }</h1>

ng serve

image

Exception or Error

[WARNING] NG8112: @let gender is declared but its value is never read. [plugin angular-compiler]

Your Environment

Angular CLI: 18.2.4
Node: 20.11.1
Package Manager: yarn 1.22.19
OS: win32 x64

Angular: 18.2.4
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.4
@angular-devkit/build-angular   18.2.4
@angular-devkit/core            18.2.4
@angular-devkit/schematics      18.2.4
@schematics/angular             18.2.4
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10

Anything else relevant?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions