TypeScript/tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts
2017-01-15 16:26:17 -08:00

6 lines
124 B
TypeScript

// @declaration: true
var a: object & string = ""; // error
var b: object | string = ""; // ok
a = b; // error
b = a; // ok