Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Use TypeFlags.UnionOrIntersection in isLiteralOfContextualType not TypeFlags.Union#20662

Merged
weswigham merged 1 commit into
microsoft:mastermicrosoft/TypeScript:masterfrom
weswigham:fix-contextual-intersectionsweswigham/TypeScript:fix-contextual-intersectionsCopy head branch name to clipboard
Dec 13, 2017
Merged

Use TypeFlags.UnionOrIntersection in isLiteralOfContextualType not TypeFlags.Union#20662
weswigham merged 1 commit into
microsoft:mastermicrosoft/TypeScript:masterfrom
weswigham:fix-contextual-intersectionsweswigham/TypeScript:fix-contextual-intersectionsCopy head branch name to clipboard

Conversation

@weswigham

Copy link
Copy Markdown
Member

We mistakenly used TypeFlags.Union and not TypeFlags.UnionOrIntersection for checking if this function needed to iterate over a type, so no intersection type could ever contribute to the literalness of a position. This fixes that.

Fixes #20653

@weswigham weswigham requested review from a user, ahejlsberg and mhegazy December 12, 2017 23:33
@weswigham weswigham changed the title Use TypeFlags.UnionOrIntersection not TypeFlags.Union Use TypeFlags.UnionOrIntersection in isLiteralOfContextualType not TypeFlags.Union Dec 12, 2017
@weswigham weswigham merged commit 40029a0 into microsoft:master Dec 13, 2017
@weswigham weswigham deleted the fix-contextual-intersections branch December 13, 2017 00:32
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

String literal types failing in waterline

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.