-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Exception while checking async function with unknown return type when noImplicitReturns #9320
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version:
nightly (1.9.0-dev.20160622-1.0)
Code
// @noImplicitReturns: true
async () => { if (window) return }Problem:
TypeError: Cannot read property 'flags' of undefined TypeError: Cannot read property 'flags' of undefined
at maybeTypeOfKind (./node_modules/typescript/lib/typescript.js:27268:21)
at isUnwrappedReturnTypeVoidOrAny (./node_modules/typescript/lib/typescript.js:29872:20)
at checkAllCodePathsInNonVoidFunctionReturnOrThrow (./node_modules/typescript/lib/typescript.js:27027:25)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (./node_modules/typescript/lib/typescript.js:27091:17)
at checkDeferredNodes (./node_modules/typescript/lib/typescript.js:31261:25)
at checkSourceFileWorker (./node_modules/typescript/lib/typescript.js:31293:17)
at checkSourceFile (./node_modules/typescript/lib/typescript.js:31275:13)
at Object.forEach (./node_modules/typescript/lib/typescript.js:972:30)
at getDiagnosticsWorker (./node_modules/typescript/lib/typescript.js:31323:16)
at getDiagnostics (./node_modules/typescript/lib/typescript.js:31311:24)
at Object.getEmitResolver (./node_modules/typescript/lib/typescript.js:16377:13)
at emitWorker (./node_modules/typescript/lib/typescript.js:43812:69)
at ./node_modules/typescript/lib/typescript.js:43777:66
at runWithCancellationToken (./node_modules/typescript/lib/typescript.js:43858:24)
at Object.emit (./node_modules/typescript/lib/typescript.js:43777:20)
at Object.transpileModule (./node_modules/typescript/lib/typescript.js:52691:17)
CC @spicydonuts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue