// @noflow // annotations declare class C { get(): X; } function union(o: { x: string } | { x: number }) { } function foo(c: C) { union({ x: c.get() }); }