Skip to content

Ignore optionality in the comparable relationship#12202

Merged
mhegazy merged 4 commits into
masterfrom
optionalComparable
Nov 14, 2016
Merged

Ignore optionality in the comparable relationship#12202
mhegazy merged 4 commits into
masterfrom
optionalComparable

Conversation

@DanielRosenwasser
Copy link
Copy Markdown
Member

Fixes #1447.
Fixes #12187.

The intent behind the comparability relationship is that it should succeed if two types could actually be one and the same at runtime. With optionality, the intent is that a property could be there at runtime, and so it makes sense for comparability to take that into account. Comparability should succeed regardless of property optionality.

@DanielRosenwasser DanielRosenwasser changed the title Make optionality inconsequential in the comparable relationship Ignore optionality in the comparable relationship Nov 12, 2016
@JsonFreeman
Copy link
Copy Markdown
Contributor

Looks good. I think this is not the only relaxation one could do here. But it's certainly a start, and more can be added if there are further issues.

@ahejlsberg
Copy link
Copy Markdown
Member

👍

@mhegazy mhegazy merged commit a0338d1 into master Nov 14, 2016
@mhegazy mhegazy deleted the optionalComparable branch November 14, 2016 18:47
@DanielRosenwasser
Copy link
Copy Markdown
Member Author

🎉

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.

5 participants