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

Implement positional pattern-matching by "reverse engineering" constructors #8811

Closed
gafter opened this issue Feb 17, 2016 · 2 comments
Closed

Comments

@gafter
Copy link
Member

gafter commented Feb 17, 2016

Implement #8415

@gafter gafter self-assigned this Feb 18, 2016
@gafter gafter modified the milestone: 2.0 (Preview) Feb 18, 2016
@gafter
Copy link
Member Author

gafter commented Feb 19, 2016

@MadsTorgersen I have some issues with the spec in #8415... I'm taking a much simpler approach for the prototype (of inferring positional pattern-matching from the presence of constructors). I'm not going to do any overload resolution. I'm not going to use the patterns to decide which constructors to consider. If your pattern has two elements, I'll just look for all accessible two-argument constructors whose argument names correspond to accessible properties (or fields). If there are none, or they do not all agree on which members they identify, it is an error. If they all agree, then those are the members we access for the pattern-matching operation.

@jaredpar jaredpar added the Bug label Feb 24, 2016
@gafter gafter modified the milestones: 2.0 (RC), 2.0 (Preview) Feb 25, 2016
@gafter
Copy link
Member Author

gafter commented Apr 1, 2016

A prototype of this appears in the features/patterns branch.

@gafter gafter closed this as completed Apr 1, 2016
@gafter gafter removed the 0 - Backlog label Apr 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants