Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

New Expressions #45

Closed
jridgewell opened this issue Jan 23, 2018 · 2 comments
Closed

New Expressions #45

jridgewell opened this issue Jan 23, 2018 · 2 comments
Labels

Comments

@jridgewell
Copy link
Member

What does these actually parse as? I believe all should throw errors, right?

// NewExpression of optional chain (Syntax Error)
// Or NewExpression of Optional CallExpression `new (C?.())`
new C?.();
// NewExpression of optional chain (Syntax Error)
// Or NewExpression of Optional Member CallExpression `new (obj?.C())`
new obj?.C();
// NewExpression of optional chain (Syntax Error)
// Or NewExpression of Optional MemberExpression `new (obj?.C)`
new obj?.C;
@claudepache
Copy link
Collaborator

Those do not parse, they are plain syntax errors.

@claudepache
Copy link
Collaborator

Closing this issue as it seems answered.
Related issue: #22
@jridgewell: If it is not clear, feel free to ask.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants