Skip to content
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

Fix literal comparability in relational comparison operators #12158

Merged

Conversation

sandersn
Copy link
Member

Fixes #10120

Now < behaves like ===, only more so. Literal types are always raised to their base before being compared, even if both sides are literal.

The new test is relationalOperatorComparable.

Note that a ton of baselines changed because many tests errored when literal type comparability was first introduced. That means that their symbols and types became stale, so this PR has baseline changes that would have shown up in the meantime.

Similar to ===, except that it always applies, even when comparing two
literals.
Literal types caused a bunch of errors that masked some changes in
baselines. Getting rid of these errors causes the baselines to update
again.
@sandersn sandersn merged commit a74e9d8 into master Nov 15, 2016
@sandersn sandersn deleted the fix-literal-comparability-in-relational-comparison-operators branch November 15, 2016 16:24
@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