diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d97abd4a5d0..9ca8b60d36a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -22104,7 +22104,7 @@ namespace ts { forEachReturnStatement(func.body, returnStatement => { const expr = returnStatement.expression; if (expr) { - let type = checkExpressionCached(expr, checkMode && checkMode && checkMode & ~CheckMode.SkipGenericFunctions); + let type = checkExpressionCached(expr, checkMode && checkMode & ~CheckMode.SkipGenericFunctions); if (functionFlags & FunctionFlags.Async) { // From within an async function you can return either a non-promise value or a promise. Any // Promise/A+ compatible implementation will always assimilate any foreign promise, so the