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
Support Module.[], .{}, etc. in pattern matches #6656
Comments
Comment author: @yallop I'd like to see this as well, but note that the particular example you give can be written equally concisely without the new feature: let c = Complex.{ re = 1.0; im = 1.0 } in match c with {Complex.re} -> re |
Comment author: @hcarty True - I was trying to give a concise example but I probably should have picked something more compelling. |
Comment author: @Octachron The final implementation details are here: #578. This final implementation was merged in trunk at commit 2d33e16. |
Comment author: @gasche Thanks for the triaging help! |
Comment author: @hcarty Thanks to everyone involved! |
Original bug ID: 6656
Reporter: @hcarty
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2017-09-24T15:32:53Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.02.1
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: ~DO NOT USE (was: OCaml general)
Tags: junior_job
Has duplicate: #6721
Monitored by: @gasche @yallop @hcarty
Bug description
We recently gained support for local module opens for M.[], M.{} and a few similar constructs. It would be nice to have the same support when matching values.
Steps to reproduce
A simple example that does not work with 4.02.1 but would be nice to have:
let c = Complex.{ re = 1.0; im = 1.0 } in match l with Complex.{re} -> re
The text was updated successfully, but these errors were encountered: