Skip to content

Greater/less than + other relational operators too strict on union types #11573

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
RyanCavanaugh opened this issue Oct 13, 2016 · 1 comment
Closed
Labels
Duplicate An existing issue was already created

Comments

@RyanCavanaugh
Copy link
Member

master branch as of 10/12/2016

let lhs: 10 | 20 = <any>10;
let rhs: 15 | 25 = <any>15;
if (lhs > rhs) { // Error, can't compare 10|20 to 15|25

}

Actual behavior:Error, can't compare 10 | 20 to 15 | 25
Expected: No error

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Oct 13, 2016
@RyanCavanaugh
Copy link
Member Author

Duplicate #10119

@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
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

1 participant