Merge pull request #16225 from Microsoft/sandersn/weakType

No weak type checks with comparable relation
This commit is contained in:
Anders Hejlsberg
2017-06-02 13:53:16 -07:00
committed by GitHub

View File

@@ -8816,7 +8816,8 @@ namespace ts {
}
}
if (!(source.flags & TypeFlags.UnionOrIntersection) &&
if (relation !== comparableRelation &&
!(source.flags & TypeFlags.UnionOrIntersection) &&
!(target.flags & TypeFlags.Union) &&
!isIntersectionConstituent &&
source !== globalObjectType &&