Skip to content

Unterminated regular expression literal when using division #18607

Closed
@T-Hugs

Description

@T-Hugs

TypeScript Version: 2.5.2 (works in 2.3.4) - try it in the Playground.

Code
The below is a repro as minimal as I could make it. Changing almost anything will fix the parse errors.

declare const A: any;
declare const B: any;
declare const C: any;
const x = (A / 2);
B(
    C(),
    () => { },
    () => { }
);

Expected behavior:
No parser errors.
Actual behavior:
Several errors starting with "= expected" and "Unterminated regular expression literal".

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions