File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3651,9 +3651,7 @@ module ts {
36513651 var maybeCache = maybeStack[depth];
36523652 // If result is definitely true, copy assumptions to global cache, else copy to next level up
36533653 var destinationCache = result === Ternary.True || depth === 0 ? relation : maybeStack[depth - 1];
3654- for (var p in maybeCache) {
3655- destinationCache[p] = maybeCache[p];
3656- }
3654+ copyMap(maybeCache, destinationCache);
36573655 }
36583656 else {
36593657 // A false result goes straight into global cache (when something is false under assumptions it
Original file line number Diff line number Diff line change @@ -208,6 +208,12 @@ module ts {
208208 return result ;
209209 }
210210
211+ export function copyMap < T > ( source : Map < T > , target : Map < T > ) : void {
212+ for ( var p in source ) {
213+ target [ p ] = source [ p ] ;
214+ }
215+ }
216+
211217 /**
212218 * Creates a map from the elements of an array.
213219 *
You can’t perform that action at this time.
0 commit comments