In case we want to define a macro that requires some keys from the struct, 
@enforce_keys should have `accumulate: true`
Otherwise we cannot require some fields from a structures in multiple 
places.

We could use 
```
quote do
    @enforce_keys [:key] ++ (Module.get_attribute(__MODULE__, 
:enforce_keys) || [])
end
```
in __using__
But this way if we do `use` before our own @enforce_keys the key will get 
overwritten.
If we allowed that to accumulate we could do @enforce_keys many time still 
respecting all of them

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/213ebf4b-c4b3-4468-b191-efe9c203f403%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to