File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -687,14 +687,13 @@ namespace ts {
687687 : skipTrivia ( sourceFile . text , errorNode . pos ) ;
688688
689689 // These asserts should all be satisfied for a properly constructed `errorNode`.
690- // Upstream from https://github.com/Microsoft/TypeScript/issues/20809.
691690 if ( isMissing ) {
692- Debug . assert ( pos === errorNode . pos ) ;
693- Debug . assert ( pos === errorNode . end ) ;
691+ Debug . assert ( pos === errorNode . pos , "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809" ) ;
692+ Debug . assert ( pos === errorNode . end , "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809" ) ;
694693 }
695694 else {
696- Debug . assert ( pos >= errorNode . pos ) ;
697- Debug . assert ( pos <= errorNode . end ) ;
695+ Debug . assert ( pos >= errorNode . pos , "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809" ) ;
696+ Debug . assert ( pos <= errorNode . end , "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809" ) ;
698697 }
699698
700699 return createTextSpanFromBounds ( pos , errorNode . end ) ;
Original file line number Diff line number Diff line change @@ -336,13 +336,11 @@ namespace ts.refactor.extractSymbol {
336336 Return = 1 << 2
337337 }
338338
339- // This assert is upstream from https://github.com/Microsoft/TypeScript/issues/20809.
340339 // We believe it's true because the node is from the (unmodified) tree.
341- Debug . assert ( nodeToCheck . pos <= nodeToCheck . end ) ;
340+ Debug . assert ( nodeToCheck . pos <= nodeToCheck . end , "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809" ) ;
342341
343- // This assert is upstream from https://github.com/Microsoft/TypeScript/issues/20809.
344342 // For understanding how skipTrivia functioned:
345- Debug . assert ( ! positionIsSynthesized ( nodeToCheck . pos ) ) ;
343+ Debug . assert ( ! positionIsSynthesized ( nodeToCheck . pos ) , "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809" ) ;
346344
347345 if ( ! isStatement ( nodeToCheck ) && ! ( isExpressionNode ( nodeToCheck ) && isExtractableExpression ( nodeToCheck ) ) ) {
348346 return [ createDiagnosticForNode ( nodeToCheck , Messages . statementOrExpressionExpected ) ] ;
You can’t perform that action at this time.
0 commit comments