config.ml
config.ml copied to clipboard
Support @@cfg in match cases
Currently, this is unsupported:
let foo a =
match a with
| 0 -> "0"
| 1 -> "1"
[@@cfg (disable=true)]
And the expected behavior is that we can remove that match case with the annotation.
This is mostly important for having good support for conditional constructors and variants, so that we can disable in tandem the pattern matching branches for them.
I am planning to look at this during the week.
Sounds great! ✨ Let us know if we can help :) and feel free to open a draft PR if you want some early feedback. Thanks! 🙏🏼
@leostera I think we can close this now!