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

Already on GitHub? Sign in to your account

Error when emitting the declaration for an exported class that extends an intersection #14074

Merged
merged 4 commits into from
Feb 15, 2017

Conversation

sandersn
Copy link
Member

Fixes #14017 by making the mixin emit illegal.

Error when emitting an extends clause for a type that has no symbol.
This error only occurs on exported classes.
This prevents the emitter from producing types that extend from
intersections, which are not parseable right now.
@mhegazy
Copy link
Contributor

mhegazy commented Feb 14, 2017

@sandersn can you also file an issue to track parsing the intersection types in heritage clauses.

@@ -2352,6 +2352,10 @@
"category": "Error",
"code": 4092
},
"Extends clause of exported class '{0}' refers to a type with no declaration.": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a type whose name cannot be referenced.

@sandersn
Copy link
Member Author

@mhegazy Done: #14075

@@ -2352,6 +2352,10 @@
"category": "Error",
"code": 4092
},
"Extends clause of exported class '{0}' refers to a type whose name cannot be referenced.": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "The 'extends clause of exported class...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? All the other messages like this just start with "Extends clause ...".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minutes with @RyanCavanaugh turned up another option we liked even more: 'extends' clause of exported class ...

I'll go with that and update all the other error messages to match.

Refer to "'extends' clause" instead of "Extends clause".
@sandersn sandersn merged commit 1296f24 into master Feb 15, 2017
@sandersn sandersn deleted the error-on-decl-of-extends-intersection branch February 15, 2017 21:43
@mhegazy
Copy link
Contributor

mhegazy commented Feb 15, 2017

@sandersn please cherry-pick this in release-2.2

@sandersn
Copy link
Member Author

@mhegazy done

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants