Merge pull request #19250 from Microsoft/mark-fresh-spread-types-with-ContainsObjectLiteral

Mark fresh spread types with ContainsObjectLiteral
This commit is contained in:
Nathan Shively-Sanders
2017-10-17 11:01:34 -07:00
committed by GitHub
7 changed files with 84 additions and 2 deletions

View File

@@ -7972,7 +7972,7 @@ namespace ts {
const spread = createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
spread.flags |= propagatedFlags;
spread.flags |= TypeFlags.FreshLiteral;
spread.flags |= TypeFlags.FreshLiteral | TypeFlags.ContainsObjectLiteral;
(spread as ObjectType).objectFlags |= ObjectFlags.ObjectLiteral;
spread.symbol = symbol;
return spread;