File tree Expand file tree Collapse file tree
src/compiler/transformers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1510,8 +1510,7 @@ namespace ts {
15101510 break ;
15111511
15121512 default :
1513- Debug . failBadSyntaxKind ( node ) ;
1514- break ;
1513+ return Debug . failBadSyntaxKind ( node ) ;
15151514 }
15161515
15171516 const captureNewTargetStatement = createVariableStatement (
Original file line number Diff line number Diff line change @@ -430,8 +430,7 @@ namespace ts {
430430 return visitFunctionExpression ( < FunctionExpression > node ) ;
431431
432432 default :
433- Debug . failBadSyntaxKind ( node ) ;
434- return visitEachChild ( node , visitor , context ) ;
433+ return Debug . failBadSyntaxKind ( node ) ;
435434 }
436435 }
437436
Original file line number Diff line number Diff line change @@ -72,8 +72,7 @@ namespace ts {
7272 return visitJsxFragment ( node , /*isChild*/ true ) ;
7373
7474 default :
75- Debug . failBadSyntaxKind ( node ) ;
76- return undefined ;
75+ return Debug . failBadSyntaxKind ( node ) ;
7776 }
7877 }
7978
@@ -182,7 +181,7 @@ namespace ts {
182181 return visitJsxExpression ( node ) ;
183182 }
184183 else {
185- Debug . failBadSyntaxKind ( node ) ;
184+ return Debug . failBadSyntaxKind ( node ) ;
186185 }
187186 }
188187
Original file line number Diff line number Diff line change @@ -324,8 +324,7 @@ namespace ts {
324324 return node ;
325325
326326 default :
327- Debug . failBadSyntaxKind ( node ) ;
328- return undefined ;
327+ return Debug . failBadSyntaxKind ( node ) ;
329328 }
330329 }
331330
@@ -531,8 +530,7 @@ namespace ts {
531530 return visitImportEqualsDeclaration ( < ImportEqualsDeclaration > node ) ;
532531
533532 default :
534- Debug . failBadSyntaxKind ( node ) ;
535- return visitEachChild ( node , visitor , context ) ;
533+ return Debug . failBadSyntaxKind ( node ) ;
536534 }
537535 }
538536
@@ -1870,10 +1868,8 @@ namespace ts {
18701868 return createIdentifier ( "Boolean" ) ;
18711869
18721870 default :
1873- Debug . failBadSyntaxKind ( ( < LiteralTypeNode > node ) . literal ) ;
1874- break ;
1871+ return Debug . failBadSyntaxKind ( ( < LiteralTypeNode > node ) . literal ) ;
18751872 }
1876- break ;
18771873
18781874 case SyntaxKind . NumberKeyword :
18791875 return createIdentifier ( "Number" ) ;
@@ -1900,8 +1896,7 @@ namespace ts {
19001896 break ;
19011897
19021898 default :
1903- Debug . failBadSyntaxKind ( node ) ;
1904- break ;
1899+ return Debug . failBadSyntaxKind ( node ) ;
19051900 }
19061901
19071902 return createIdentifier ( "Object" ) ;
You can’t perform that action at this time.
0 commit comments