Fix inference circularity error triggered by exhaustive switch analysis

This commit is contained in:
Anders Hejlsberg 2019-09-15 09:49:57 -07:00
parent 59b76cee89
commit 945babbaac

View File

@ -2871,7 +2871,7 @@ namespace ts {
function tryEnterOrLeaveBlock(operationIndex: number): void {
if (blocks) {
for (; blockIndex < blockActions!.length && blockOffsets![blockIndex] <= operationIndex; blockIndex++) {
const block = blocks[blockIndex];
const block: CodeBlock = blocks[blockIndex];
const blockAction = blockActions![blockIndex];
switch (block.kind) {
case CodeBlockKind.Exception: