TypeScript/tests/cases/compiler/objectLiteralFreshnessWithSpread.ts
Nathan Shively-Sanders 3e142f8e52 Object literal freshness errors with spreads
Previously, object literals with spreads in them would not issue object
literal freshness errors.  Fixes #13878
2017-02-06 08:47:11 -08:00

3 lines
109 B
TypeScript

let x = { b: 1, extra: 2 }
let xx: { a, b } = { a: 1, ...x, z: 3 } // error for 'z', no error for 'extra'