-
Notifications
You must be signed in to change notification settings - Fork 3.4k
No API to retrieve enforced_keys on a struct #14500
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
Comments
It is available on |
If so then it's not what I'd expect to see
|
Hrm, could it be main only or am I hallucinating? |
Seems there used to be a
|
Ah, thank you, that's it. We have plans to make the default key optional once we introduce typed structs. That's because once we introduce typed structs, a required field should not really have a default value, otherwise if you say |
Elixir and Erlang/OTP versions
any
Operating system
any
Current behavior
When a language server is returning completions with struct keys it would be nice to highlight the enforced ones. There is currently no API to retrieve that info. The
@enforce_keys
attribute is compile time only, there is no trace of that left in EEP48 docs.Expected behavior
A metadata entry with enforced keys in documentation for the
:__struct__
functionThe text was updated successfully, but these errors were encountered: