mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-21 08:25:43 -05:00
Fix infinite recursion in control flow analyzer inlining logic (#45845)
* Move inlineLevel counter to main type checker scope * Add regression test
This commit is contained in:
@@ -333,6 +333,7 @@ namespace ts {
|
||||
let totalInstantiationCount = 0;
|
||||
let instantiationCount = 0;
|
||||
let instantiationDepth = 0;
|
||||
let inlineLevel = 0;
|
||||
let currentNode: Node | undefined;
|
||||
|
||||
const emptySymbols = createSymbolTable();
|
||||
@@ -23247,7 +23248,6 @@ namespace ts {
|
||||
let key: string | undefined;
|
||||
let isKeySet = false;
|
||||
let flowDepth = 0;
|
||||
let inlineLevel = 0;
|
||||
if (flowAnalysisDisabled) {
|
||||
return errorType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user