Skip to content

Emit issue with member access dot operator and parentheses usually in conjunction with type assertion #15444

@gdelmas

Description

@gdelmas

Code

a.foo()
(b).foo()

Expected emit:

a.foo();
(b).foo();

Actual emit:

a.foo()(b).foo();

This becomes an issue when using type assertions inline:

Code

a.foo()
(b as Bar).foo()

Expected emit:

a.foo();
b.foo();

Actual emit:

a.foo()(b).foo();

Angle brackets type assertion have a similar issue:

Code

a.foo()
<Bar>b.foo()

Actual emit:

a.foo()
    < Bar > b.foo();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions