/* Test to ensure that spreads of intersections wait until every member is
 * resolved before the spread resolves to a result. */

type O = A & B;
declare const o: O;
({...o}) as {p: number, q: string, ...}; // OK
({...o}) as {p: number, q: number, ...}; // error: string ~> number (prop q)
({...o}) as {p: string, q: string, ...}; // error: number ~> string (prop p)

// types declared below, so they resolve after the spread is processed
type A = { p: number, ... };
type B = { q: string, ... };
