Skip to content

Commit 68f0703

Browse files
committed
Replace errorType return with Debug fail in checkExpressionWorker
1 parent e18c935 commit 68f0703

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ import {
254254
getDeclarationsOfKind,
255255
getDeclaredExpandoInitializer,
256256
getDecorators,
257+
getDefaultLibFileName,
257258
getDirectoryPath,
258259
getEffectiveBaseTypeNode,
259260
getEffectiveConstraintOfTypeParameter,
@@ -37955,8 +37956,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
3795537956
return checkJsxAttributes(node as JsxAttributes, checkMode);
3795637957
case SyntaxKind.JsxOpeningElement:
3795737958
Debug.fail("Shouldn't ever directly check a JsxOpeningElement");
37959+
default:
37960+
return Debug.failBadSyntaxKind(node, "Unhandled expression node kind in checkExpressionWorker");
3795837961
}
37959-
return errorType;
3796037962
}
3796137963

3796237964
// DECLARATION AND STATEMENT TYPE CHECKING

0 commit comments

Comments
 (0)