Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ivy - expressions with dots throw object literal same name strict errors #33590

Closed
intellix opened this issue Nov 5, 2019 · 0 comments

Comments

@intellix
Copy link

@intellix intellix commented Nov 5, 2019

馃悶 bug report

Affected Package

@angular/flex-layout, potentially anything with this notation

Is this a regression?

Unsure

Description

A clear and concise description of the problem...
<div [fxLayout]="fxLayout" [fxLayout.xs]="fxLayoutXs">abc123</div>

Throws:

   ERROR in src/app/app.component.html(1,28): error TS1117: An object literal cannot have multiple properties with the same name in strict mode.
    src/app/app.component.html(1,28): error TS2349: This expression is not callable.
      Type '{ fxLayout: any; (Missing): any; }' has no call signatures.
    src/app/app.component.html(1,28): error TS18004: No value exists in scope for the shorthand property 'fxLayout'. Either declare one or provide an initializer.

馃敩 Minimal Reproduction

https://github.com/intellix/flexlayout-reproduction

馃敟 Exception or Error

ERROR in src/app/app.component.html(1,28): error TS1117: An object literal cannot have multiple properties with the same name in strict mode.
    src/app/app.component.html(1,28): error TS2349: This expression is not callable.
      Type '{ fxLayout: any; (Missing): any; }' has no call signatures.
    src/app/app.component.html(1,28): error TS18004: No value exists in scope for the shorthand property 'fxLayout'. Either declare one or provide an initializer.

馃實 Your Environment

Angular Version:

Angular CLI: 9.0.0-rc.0
Node: 10.16.0
OS: darwin x64
Angular: 9.0.0-rc.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.0
@angular-devkit/build-angular     0.900.0-rc.0
@angular-devkit/build-optimizer   0.900.0-rc.0
@angular-devkit/build-webpack     0.900.0-rc.0
@angular-devkit/core              9.0.0-rc.0
@angular-devkit/schematics        9.0.0-rc.0
@angular/cdk                      8.2.3
@angular/flex-layout              8.0.0-beta.27
@ngtools/webpack                  9.0.0-rc.0
@schematics/angular               9.0.0-rc.0
@schematics/update                0.900.0-rc.0
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

Anything else relevant?

Nope

Nope

Potentially related:

@ngbot ngbot bot modified the milestone: needsTriage Nov 5, 2019
@alxhub alxhub added this to Backlog in Compiler via automation Nov 7, 2019
@JoostK JoostK self-assigned this Nov 10, 2019
JoostK added a commit to JoostK/angular that referenced this issue Nov 11, 2019
鈥king

The template type checker generates code to check directive inputs and
outputs, whose name may contain characters that can not be used as
identifier in TypeScript. Prior to this change, such names would be
emitted into the generated code as is, resulting in invalid code and
unexpected template type check errors.

This commit fixes the bug by representing the potentially invalid names
as string literal instead of raw identifier.

Fixes angular#33590
JoostK added a commit to JoostK/angular that referenced this issue Nov 11, 2019
鈥king

The template type checker generates code to check directive inputs and
outputs, whose name may contain characters that can not be used as
identifier in TypeScript. Prior to this change, such names would be
emitted into the generated code as is, resulting in invalid code and
unexpected template type check errors.

This commit fixes the bug by representing the potentially invalid names
as string literal instead of raw identifier.

Fixes angular#33590
@IgorMinar IgorMinar modified the milestones: v9-candidates, v9-blockers Nov 16, 2019
alxhub added a commit that referenced this issue Nov 20, 2019
鈥king (#33741)

The template type checker generates code to check directive inputs and
outputs, whose name may contain characters that can not be used as
identifier in TypeScript. Prior to this change, such names would be
emitted into the generated code as is, resulting in invalid code and
unexpected template type check errors.

This commit fixes the bug by representing the potentially invalid names
as string literal instead of raw identifier.

Fixes #33590

PR Close #33741
@alxhub alxhub closed this in 70311eb Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.