mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-01 21:34:46 -05:00
Object literal freshness errors with spreads
Previously, object literals with spreads in them would not issue object literal freshness errors. Fixes #13878
This commit is contained in:
@@ -11864,6 +11864,8 @@ namespace ts {
|
||||
if (spread.flags & TypeFlags.Object) {
|
||||
// only set the symbol and flags if this is a (fresh) object type
|
||||
spread.flags |= propagatedFlags;
|
||||
spread.flags |= TypeFlags.FreshLiteral;
|
||||
(spread as ObjectType).objectFlags |= ObjectFlags.ObjectLiteral;
|
||||
spread.symbol = node.symbol;
|
||||
}
|
||||
return spread;
|
||||
|
||||
Reference in New Issue
Block a user