Skip to content

Compiler crashes with Cannot read property 'kind' of undefined #29661

@ttv86

Description

@ttv86

TypeScript Version:
Tested on both 3.2.2 & 3.4.0-dev.20190131

Search Terms:
Cannot read property 'kind' of undefined

Code
Got reduced the error down to this: When there are 2 files in compilation, and other contains some command, but isn't called, whole TypeScript compiler crashes on an exception.

HistTest.zip
Extract attached zip file to the directory, run "npm install" and then "webpack"

Expected behavior:
Either clear error what went wrong or a successful compilation.

Actual behavior:
Webpack throws an exception:
TypeError: Cannot read property 'kind' of undefined
at Object.isBinaryExpression (c:....\node_modules\typescript\lib\typescript.js:13389:21)
at getTypeReferenceTypeWorker (c:....\node_modules\typescript\lib\typescript.js:38553:51)

Related Issues:
#29365
#28810

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputDuplicateAn existing issue was already created

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions