Skip to content

Commit

Permalink
Do not rule out intersection case
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-williams committed Mar 26, 2019
1 parent e91ee14 commit e038290
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 @@ -16185,7 +16185,7 @@ namespace ts {
let propType;
return isMatchingReference(reference, expr.expression) &&
(isDiscriminantProperty(computedType, name) ||
((computedType.flags & TypeFlags.UnionOrIntersection) === 0) &&
((computedType.flags & TypeFlags.Union) === 0) &&
(propType = getTypeOfPropertyOfType(computedType, name))
&& isUnitType(propType));
}
Expand Down

0 comments on commit e038290

Please sign in to comment.