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: Debug Failure. Unhandled declaration kind! 241 at getTypeOfVariableOrParameterOrPropertyWorker #27352

Closed
minestarks opened this issue Sep 25, 2018 · 4 comments · Fixed by #27989
Assignees
Labels
Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output Fixed A PR has been merged for this issue

Comments

@minestarks
Copy link
Member

TypeScript Version: 3.1.0-dev.20180925

git clone --depth=1 https://github.com/google/lovefield.git
cd lovefield
tsc --init
tsc --allowJs --checkJs

Compiler crashes with the callstack:

Error: Debug Failure. Unhandled declaration kind! 241 for { flags: 100665092; declarations: 241,187,187,71 }
    at getTypeOfVariableOrParameterOrPropertyWorker (node_modules\typescript\lib\tsc.js:28800:33)
    at getTypeOfVariableOrParameterOrProperty (node_modules\typescript\lib\tsc.js:28725:48)
    at getTypeOfSymbol (node_modules\typescript\lib\tsc.js:28990:24)
    at checkPropertyAccessExpressionOrQualifiedName (node_modules\typescript\lib\tsc.js:39419:53)
    at checkPropertyAccessExpression (node_modules\typescript\lib\tsc.js:39371:20)
    at checkExpressionWorker (node_modules\typescript\lib\tsc.js:42384:28)
    at checkExpression (node_modules\typescript\lib\tsc.js:42334:42)
    at checkNonNullExpression (node_modules\typescript\lib\tsc.js:39352:37)
    at checkPropertyAccessExpressionOrQualifiedName (node_modules\typescript\lib\tsc.js:39378:28)
    at checkPropertyAccessExpression (node_modules\typescript\lib\tsc.js:39371:20)
@weswigham
Copy link
Member

weswigham commented Sep 25, 2018

That'd be an EnumDeclaration merged with 2x PropertyAccessExpression and 1x Identifier, I'd assume one of their enums in their .d.ts is merging with the js source of itself.

@weswigham weswigham added Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output labels Sep 27, 2018
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.2 milestone Oct 10, 2018
@sandersn
Copy link
Member

sandersn commented Oct 19, 2018

Yes, there are 3 merges for nearly everything:

  1. d.ts
  2. Closure-style externs.js
  3. Implementation JS file.

This project is a gold mine of bugs beyond the OP's crash:

  1. Crash when merging enum with expando. (that's the original crash)
  2. Crash when merging enum member with expando.
  3. Crash when merging interface-declared method declaration with prototype-property-assignment method.

@sandersn sandersn added the Fixed A PR has been merged for this issue label Oct 19, 2018
@fijiwebdesign
Copy link

fijiwebdesign commented May 22, 2019

I got this error: "Error: Debug Failure. Unhandled declaration kind! GetAccessor" which is same as microsoft/vscode#60462 due to declaring a getter/setter of an existing property.

@sandersn
Copy link
Member

@fijiwebdesign Can you open a new bug? Unless you are using TS 3.1 then it is unlikely to be the same one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants