diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 27b0839720..b7779fc9da 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5678,7 +5678,7 @@ namespace ts { } } if (target.flags & TypeFlags.Union) { - if (result = typeRelatedToSomeType(source, target, reportErrors)) { + if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & TypeFlags.Primitive))) { return result; } }