Skip to content

Allow intersected numbers in arithmetics & element access #4373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

ivogabe
Copy link
Contributor

@ivogabe ivogabe commented Aug 20, 2015

Fixes #4372

// Return true if type has the given flags, or is a union or intersection type composed of types that all have those flags.
// Return true if type has the given flags,
// is a union type composed of types that all have those flags,
// or an intersection type that contains (at least) one type that has those flags.
function allConstituentTypesHaveKind(type: Type, kind: TypeFlags): boolean {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the name of this function is now misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree about that, do you have a better name? Maybe just typeHasKind?

@ivogabe
Copy link
Contributor Author

ivogabe commented Sep 10, 2015

Closing since #4639 proposes a better solution

@ivogabe ivogabe closed this Sep 10, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

3 participants