Skip to content

Commit

Permalink
More closely match previous behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed May 24, 2021
1 parent 86f09ae commit d45806a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24122,7 +24122,7 @@ namespace ts {
}

function isGenericTypeWithUnionConstraint(type: Type) {
return !!(type.flags & TypeFlags.Instantiable && getBaseConstraintOrType(type).flags & TypeFlags.Union);
return !!(type.flags & TypeFlags.Instantiable && getBaseConstraintOrType(type).flags & (TypeFlags.Nullable | TypeFlags.Union));
}

function containsGenericType(type: Type): boolean {
Expand Down

0 comments on commit d45806a

Please sign in to comment.