Which @angular/* package(s) are the source of the bug?
compiler
Is this a regression?
Yes
Description
@let value = 'one';
@if (true) {
@let value = 1;
{{ value }}
}
result:

should be 1, not one.
app.component.js

another problem
@let value = 'hello world';
<input #value (input)="0">
{{ value.value }}
will get a error

looks like the value is not input ref, change the code to
@let value = 'hello world';
<input #value (input)="0">
{{ value }}
no more error, but the result is

it is a input ref...

Please provide a link to a minimal reproduction of the bug
https://github.com/keatkeat87/ng-let-bug.git
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 18.1.0-rc.0
Node: 20.11.1
Package Manager: yarn 1.22.19
OS: win32 x64
Angular: 18.1.0-next.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1801.0-rc.0
@angular-devkit/build-angular 18.1.0-rc.0
@angular-devkit/core 18.1.0-rc.0
@angular-devkit/schematics 18.1.0-rc.0
@angular/cli 18.1.0-rc.0
@schematics/angular 18.1.0-rc.0
rxjs 7.8.1
typescript 5.5.2
zone.js 0.14.7
Anything else?
No response
Which @angular/* package(s) are the source of the bug?
compiler
Is this a regression?
Yes
Description
result:

should be 1, not one.
app.component.js
another problem
will get a error
looks like the value is not input ref, change the code to
no more error, but the result is
it is a input ref...
Please provide a link to a minimal reproduction of the bug
https://github.com/keatkeat87/ng-let-bug.git
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version)Anything else?
No response