Skip to content

Compiler crashes with TypeError: Cannot read property 'kind' of undefined at Object.isIdentifier  #33731

@felixfbecker

Description

@felixfbecker

TypeScript Version: 3.7.0-beta

Search Terms: kind undefined

Code

It happens only in https://github.com/sourcegraph/sourcegraph/tree/typescript-3.7/shared (the browser/ and the web/ project compile fine)

Expected behavior:

No error

Actual behavior:

Compiler crashes with

/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:11300
                    ^

TypeError: Cannot read property 'kind' of undefined
    at Object.isIdentifier (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:11300:21)
    at lookupSymbolForPropertyAccess (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:25812:20)
    at lookupSymbolForPropertyAccess (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:25816:30)
    at lookupSymbolForPropertyAccess (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:25816:30)
    at bindObjectDefinePropertyAssignment (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:25687:35)
    at bindWorker (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:25406:36)
    at bind (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:25221:13)
    at bindExpressionStatement (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:24552:13)
    at bindChildrenWorker (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:24054:21)
    at bindChildren (/Users/felix/git/sourcegraph/node_modules/typescript/lib/tsc.js:23975:17)

Playground Link:

Sorry for not having a minimal example, don't know how to narrow it down, but I hope that the open source project helps as a repro!

Related Issues:
Bunch of similar errors but no idea if they are related

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptNeeds More InfoThe issue still hasn't been fully clarified

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions