Skip to content

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

Closed

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

Activity

  1. added
    area: i18n
    area: compiler
    on Sep 16, 2024
  2. added this to the needsTriage milestone on Sep 16, 2024
  3. self-assigned this
    on Sep 17, 2024
  4. added a commit that references this issue on Sep 17, 2024
    57af37d
  5. added a commit that references this issue on Sep 18, 2024
    e685ed8
  6. added a commit that references this issue on Sep 18, 2024
    f611faa
  7. angular-automatic-lock-bot commented on Oct 19, 2024

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  8. locked and limited conversation to collaborators on Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: compilerarea: i18ncompiler: extended diagnosticsstate: has PR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions