Skip to content

Unterminated regular expression literal when using division #18607

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
T-Hugs opened this issue Sep 20, 2017 · 4 comments
Closed

Unterminated regular expression literal when using division #18607

T-Hugs opened this issue Sep 20, 2017 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@T-Hugs
Copy link

T-Hugs commented Sep 20, 2017

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".

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Sep 20, 2017
@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Sep 21, 2017

Seems to be working with the latest which would make sense since @sandersn and @weswigham have been working on arrow function lookahead stuff.

Can you give our nightlies a try?

npm install typescript@next

Edit: realized you may not be using this with npm 😄

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Sep 21, 2017

Let's add a test case here.

@DanielRosenwasser DanielRosenwasser added the Fixed A PR has been merged for this issue label Sep 21, 2017
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 2.6 milestone Sep 21, 2017
@DanielRosenwasser
Copy link
Member

Sounds like @sandersn believes this is a dupe of #18123

@DanielRosenwasser DanielRosenwasser added Duplicate An existing issue was already created and removed Bug A bug in TypeScript Fixed A PR has been merged for this issue labels Sep 21, 2017
@DanielRosenwasser DanielRosenwasser removed this from the TypeScript 2.6 milestone Sep 21, 2017
@T-Hugs
Copy link
Author

T-Hugs commented Sep 21, 2017

@DanielRosenwasser Seems plausible. Works with latest for me.

@T-Hugs T-Hugs closed this as completed Sep 21, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants