You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BugA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputDuplicateAn existing issue was already created
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)
Don't know if is the same cause, but I'm having the same error with the following code that, although is weird, tsc is not emitting any diagnostics and it crash without stacktrace (was able to get a stacktrace with ts-node).
class C<S> {
a={}
m(s: S) {
const b = { ...this.a, ...s } = { }
}
}
/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:71491
throw e;
^
TypeError: Cannot read property 'kind' of undefined
at Object.isIdentifier (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:10382:21)
at getLiteralTypeFromPropertyName (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:32924:23)
at Object.map (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:378:29)
at getRestType (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:29004:47)
at checkObjectLiteralDestructuringPropertyAssignment (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43034:28)
at checkObjectLiteralAssignment (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43003:17)
at checkDestructuringAssignment (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43106:24)
at checkBinaryLikeExpression (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43186:24)
at checkBinaryExpression (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43181:20)
at checkExpressionWorker (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43743:28)
BugA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputDuplicateAn existing issue was already created
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
The text was updated successfully, but these errors were encountered: