mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 04:17:34 -06:00
Move bug URLs into assert messages
This commit is contained in:
parent
8ec36e988d
commit
9bc0d33512
@ -687,14 +687,13 @@ namespace ts {
|
||||
: skipTrivia(sourceFile.text, errorNode.pos);
|
||||
|
||||
// These asserts should all be satisfied for a properly constructed `errorNode`.
|
||||
// Upstream from https://github.com/Microsoft/TypeScript/issues/20809.
|
||||
if (isMissing) {
|
||||
Debug.assert(pos === errorNode.pos);
|
||||
Debug.assert(pos === errorNode.end);
|
||||
Debug.assert(pos === errorNode.pos, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809");
|
||||
Debug.assert(pos === errorNode.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809");
|
||||
}
|
||||
else {
|
||||
Debug.assert(pos >= errorNode.pos);
|
||||
Debug.assert(pos <= errorNode.end);
|
||||
Debug.assert(pos >= errorNode.pos, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809");
|
||||
Debug.assert(pos <= errorNode.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809");
|
||||
}
|
||||
|
||||
return createTextSpanFromBounds(pos, errorNode.end);
|
||||
|
||||
@ -336,13 +336,11 @@ namespace ts.refactor.extractSymbol {
|
||||
Return = 1 << 2
|
||||
}
|
||||
|
||||
// This assert is upstream from https://github.com/Microsoft/TypeScript/issues/20809.
|
||||
// We believe it's true because the node is from the (unmodified) tree.
|
||||
Debug.assert(nodeToCheck.pos <= nodeToCheck.end);
|
||||
Debug.assert(nodeToCheck.pos <= nodeToCheck.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809");
|
||||
|
||||
// This assert is upstream from https://github.com/Microsoft/TypeScript/issues/20809.
|
||||
// For understanding how skipTrivia functioned:
|
||||
Debug.assert(!positionIsSynthesized(nodeToCheck.pos));
|
||||
Debug.assert(!positionIsSynthesized(nodeToCheck.pos), "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809");
|
||||
|
||||
if (!isStatement(nodeToCheck) && !(isExpressionNode(nodeToCheck) && isExtractableExpression(nodeToCheck))) {
|
||||
return [createDiagnosticForNode(nodeToCheck, Messages.statementOrExpressionExpected)];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user