diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a804cacb7de..9d069a547d9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4832,13 +4832,13 @@ namespace ts { sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType); targetType = typeToString(target, /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType); } - + if (!message) { message = relation === comparableRelation ? Diagnostics.Type_0_is_not_comparable_with_type_1 : - Diagnostics.Type_0_is_not_assignable_to_type_1 + Diagnostics.Type_0_is_not_assignable_to_type_1; } - + reportError(message, sourceType, targetType); }