File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1546,7 +1546,7 @@ const _super = (function (geti, seti) {
15461546 const savedTempFlags = tempFlags ;
15471547 tempFlags = 0 ;
15481548 emitSignatureHead ( node ) ;
1549- emitBlockFunctionBodyAndEndLexicalEnvironment ( node , body ) ;
1549+ emitBlockFunctionBody ( node , body ) ;
15501550 if ( indentedFlag ) {
15511551 decreaseIndent ( ) ;
15521552 }
@@ -1610,7 +1610,7 @@ const _super = (function (geti, seti) {
16101610 return true ;
16111611 }
16121612
1613- function emitBlockFunctionBodyAndEndLexicalEnvironment ( parentNode : Node , body : Block ) {
1613+ function emitBlockFunctionBody ( parentNode : Node , body : Block ) {
16141614 // TODO(rbuckton): This should be removed once source maps are aligned with the old
16151615 // emitter and new baselines are taken. This exists solely to
16161616 // align with the old emitter.
Original file line number Diff line number Diff line change @@ -1063,7 +1063,8 @@ namespace ts {
10631063 "_this" ,
10641064 createThis ( )
10651065 )
1066- ] )
1066+ ] ) ,
1067+ /*location*/ node
10671068 )
10681069 ) ;
10691070 }
@@ -1343,7 +1344,9 @@ namespace ts {
13431344
13441345 const expression = visitNode ( body , visitor , isExpression ) ;
13451346 if ( expression ) {
1346- statements . push ( createReturn ( expression , /*location*/ statementsLocation ) ) ;
1347+ const returnStatement = createReturn ( expression , /*location*/ statementsLocation ) ;
1348+ setNodeEmitFlags ( returnStatement , NodeEmitFlags . NoTokenSourceMaps ) ;
1349+ statements . push ( returnStatement ) ;
13471350 }
13481351 }
13491352
You can’t perform that action at this time.
0 commit comments