File tree 2 files changed +7
-3
lines changed 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3652,9 +3652,7 @@ module ts {
3652
3652
var maybeCache = maybeStack[depth];
3653
3653
// If result is definitely true, copy assumptions to global cache, else copy to next level up
3654
3654
var destinationCache = result === Ternary.True || depth === 0 ? relation : maybeStack[depth - 1];
3655
- for (var p in maybeCache) {
3656
- destinationCache[p] = maybeCache[p];
3657
- }
3655
+ copyMap(/*source*/maybeCache, /*target*/destinationCache);
3658
3656
}
3659
3657
else {
3660
3658
// 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 {
208
208
return result ;
209
209
}
210
210
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
+
211
217
/**
212
218
* Creates a map from the elements of an array.
213
219
*
You can’t perform that action at this time.
0 commit comments