Skip to content

Compiler crashes when emitting declaration for malformed interface #12291

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
HerringtonDarkholme opened this issue Nov 16, 2016 · 0 comments
Closed
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@HerringtonDarkholme
Copy link
Contributor

TypeScript Version: nightly, with --declaration flag, also reproducable with stable version
Code

// @declaration
class A {}
interface Class extends (typeof A) {}

Expected behavior:
Report error like without --declaration flag.

Actual behavior:
Crashes with Cannot read property 'heritageClauses' of undefined in writeInterfaceDeclaration

@mhegazy mhegazy added the Bug A bug in TypeScript label Nov 16, 2016
@mhegazy mhegazy added this to the TypeScript 2.1.3 milestone Nov 18, 2016
sheetalkamat added a commit that referenced this issue Nov 18, 2016
Fixes for #12291 and  #12326: Declaration emit when there are errors in the source file
@sheetalkamat sheetalkamat added the Fixed A PR has been merged for this issue label Nov 18, 2016
sheetalkamat added a commit that referenced this issue Nov 18, 2016
[Release 2.1] Fixes for #12291 and #12326: Declaration emit when there are errors in the source file
@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
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants