Fix typo in inference (#22243)

This commit is contained in:
Wesley Wigham
2018-02-28 16:56:54 -08:00
committed by GitHub
parent b8e0009c9b
commit ec249f7f67

View File

@@ -11634,7 +11634,7 @@ namespace ts {
}
}
else {
if (!(priority && InferencePriority.NoConstraints && source.flags & (TypeFlags.Intersection | TypeFlags.Instantiable))) {
if (!(priority & InferencePriority.NoConstraints && source.flags & (TypeFlags.Intersection | TypeFlags.Instantiable))) {
source = getApparentType(source);
}
if (source.flags & (TypeFlags.Object | TypeFlags.Intersection)) {