mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 01:34:55 -06:00
do not make inferences with the same source\target pair multiple times
This commit is contained in:
parent
6b05ad7627
commit
517d7d983f
@ -6524,6 +6524,7 @@ namespace ts {
|
||||
let targetStack: Type[];
|
||||
let depth = 0;
|
||||
let inferiority = 0;
|
||||
const visited: Map<boolean> = {};
|
||||
inferFromTypes(source, target);
|
||||
|
||||
function isInProcess(source: Type, target: Type) {
|
||||
@ -6653,6 +6654,12 @@ namespace ts {
|
||||
return;
|
||||
}
|
||||
|
||||
const key = source.id + "," + target.id;
|
||||
if (hasProperty(visited, key)) {
|
||||
return;
|
||||
}
|
||||
visited[key] = true;
|
||||
|
||||
if (depth === 0) {
|
||||
sourceStack = [];
|
||||
targetStack = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user