Skip to content

Comparability of unions of literal numbers is too strict #10119

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
sandersn opened this issue Aug 3, 2016 · 1 comment
Closed

Comparability of unions of literal numbers is too strict #10119

sandersn opened this issue Aug 3, 2016 · 1 comment
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created

Comments

@sandersn
Copy link
Member

sandersn commented Aug 3, 2016

On master:

function f(onethree: 1 | 3, two: 2) {
  return onethree < two;
}

Expected: No error.
Actual: Operator '<' cannot be applied to types '1 | 3' and '2'.

@mhegazy
Copy link
Contributor

mhegazy commented Sep 29, 2016

closing in favor of #10120.

@mhegazy mhegazy closed this as completed Sep 29, 2016
@mhegazy mhegazy added the Duplicate An existing issue was already created label Sep 29, 2016
@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
Bug A bug in TypeScript Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants