Skip to content

Using noUnusedLocals crashes version 2.7 #21491

Closed
@dasa

Description

@dasa

TypeScript Version: 2.7.1-insiders.20180127

Is not an issue with typescript@next. It'd be great to have this fix in the 2.7 release since this is a regression.

Search Terms:

noUnusedLocals, crash

Code

See attached.

Expected behavior:

tsc --noUnusedLocals SceneServiceFactory.ts returns expected errors in 2.6.

Actual behavior:

/usr/local/lib/node_modules/typescript/lib/tsc.js:59815
                throw e;
                ^

Error: Debug Failure.
    at checkUnusedClassMembers (/usr/local/lib/node_modules/typescript/lib/tsc.js:35731:38)
    at checkUnusedIdentifiers (/usr/local/lib/node_modules/typescript/lib/tsc.js:35617:29)
    at checkSourceFileWorker (/usr/local/lib/node_modules/typescript/lib/tsc.js:37887:21)
    at checkSourceFile (/usr/local/lib/node_modules/typescript/lib/tsc.js:37865:13)
    at Object.forEach (/usr/local/lib/node_modules/typescript/lib/tsc.js:260:30)
    at getDiagnosticsWorker (/usr/local/lib/node_modules/typescript/lib/tsc.js:37931:16)
    at getDiagnostics (/usr/local/lib/node_modules/typescript/lib/tsc.js:37908:24)
    at Object.getEmitResolver (/usr/local/lib/node_modules/typescript/lib/tsc.js:20096:17)
    at emitWorker (/usr/local/lib/node_modules/typescript/lib/tsc.js:59757:69)
    at /usr/local/lib/node_modules/typescript/lib/tsc.js:59731:66

SceneServiceFactory.ts.txt

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions