Skip to content

Diagnostics for default class / function export in namespace#16704

Merged
DanielRosenwasser merged 2 commits into
microsoft:masterfrom
charlespierce:namespace_export_default
Jun 29, 2017
Merged

Diagnostics for default class / function export in namespace#16704
DanielRosenwasser merged 2 commits into
microsoft:masterfrom
charlespierce:namespace_export_default

Conversation

@charlespierce
Copy link
Copy Markdown
Contributor

Fixes #16300 & #16301

Since default function / class exports are parsed differently from other default exports, there were no diagnostic messages for when they were included in namespaces. Additionally, attempting to compile a default class export within a namespace was causing the compiler to crash as it assumed the class had a name when it actually didn't.

Updated the checker to also check for the default modifier and added a guard when transforming class declarations to handle when there is no name.

@DanielRosenwasser
Copy link
Copy Markdown
Member

DanielRosenwasser commented Jun 23, 2017

Awesome, thanks for the PR! This looks good to me, can you take a look @sandersn?

@charlespierce
Copy link
Copy Markdown
Contributor Author

Any updates / problems with this PR @sandersn? I'd like to make sure it doesn't get too far behind master.

Thanks!

@DanielRosenwasser DanielRosenwasser merged commit 22f38b7 into microsoft:master Jun 29, 2017
@charlespierce charlespierce deleted the namespace_export_default branch October 6, 2017 01:33
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants