Skip to content

Fix literal comparability in relational comparison operators#12158

Merged
sandersn merged 2 commits into
masterfrom
fix-literal-comparability-in-relational-comparison-operators
Nov 15, 2016
Merged

Fix literal comparability in relational comparison operators#12158
sandersn merged 2 commits into
masterfrom
fix-literal-comparability-in-relational-comparison-operators

Conversation

@sandersn
Copy link
Copy Markdown
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