From dc7b18e4e24796a40fc24801b3c5425e71200f1d Mon Sep 17 00:00:00 2001 From: Yuichi Nukiyama Date: Sun, 21 Aug 2016 11:42:41 +0900 Subject: [PATCH] fix some errors --- src/compiler/checker.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7ff5b5b19ed..3a6608c71d1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6401,11 +6401,10 @@ namespace ts { } } - if (source.flags & TypeFlags.ObjectType && target.flags & TypeFlags.Primitive) { - tryElaborateErrorsForPrimitivesAndObjects(source, target); - } - if (reportErrors) { + if (source.flags & TypeFlags.ObjectType && target.flags & TypeFlags.Primitive) { + tryElaborateErrorsForPrimitivesAndObjects(source, target); + } reportRelationError(headMessage, source, target); } return Ternary.False;