Matchable should have no effect on intersections.

This commit is contained in:
Daniel Rosenwasser
2015-10-28 17:10:54 -07:00
parent 262352ec5b
commit bdb1db5ae4
+1 -6
View File
@@ -4889,12 +4889,7 @@ namespace ts {
}
}
else if (target.flags & TypeFlags.Intersection) {
if (relation === matchableRelation) {
result = typeRelatedToSomeType(source, target as IntersectionType, reportErrors);
}
else {
result = typeRelatedToEachType(source, <IntersectionType>target, reportErrors);
}
result = typeRelatedToEachType(source, <IntersectionType>target, reportErrors);
if (result) {
return result;