Skip to content

Commit 540f073

Browse files
committed
Uncomment check
1 parent d8b12a7 commit 540f073

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/compiler/checker.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21672,10 +21672,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2167221672
tracing?.pop();
2167321673
}
2167421674

21675-
// if (entry !== undefined) {
21676-
// // If the previous entry and the result disagree, then something has gone wrong.
21677-
// Debug.assert(!!(entry & RelationComparisonResult.Succeeded) === (result !== Ternary.False), "Cached relationship does not match recalculated result");
21678-
// }
21675+
if (entry !== undefined) {
21676+
// If the previous entry and the result disagree, then something has gone wrong.
21677+
const entrySucceeded = !!(entry & RelationComparisonResult.Succeeded);
21678+
const resultSucceeded = result !== Ternary.False;
21679+
Debug.assertEqual(entrySucceeded, resultSucceeded, "Cached relationship does not match recalculated result");
21680+
}
2167921681

2168021682
if (outofbandVarianceMarkerHandler) {
2168121683
outofbandVarianceMarkerHandler = originalHandler;

0 commit comments

Comments
 (0)