From 035ccb9ad269fd6f51f34846d8293ab6e655500c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 23 Feb 2016 13:30:34 -0800 Subject: [PATCH] Don't elaborate errors for relations from intersections to object types. --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cf3bd49751a..28dd5406cc0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5522,7 +5522,7 @@ namespace ts { // A & B = (A & B) | (C & D). if (source.flags & TypeFlags.Intersection) { // If target is a union type the following check will report errors so we suppress them here - if (result = someTypeRelatedToType(source, target, reportErrors && !(target.flags & TypeFlags.Union))) { + if (result = someTypeRelatedToType(source, target, reportErrors && !(target.flags & (TypeFlags.Union | TypeFlags.ObjectType)))) { return result; } }