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

module directives: move @derive to before defstruct #134

Closed
novaugust opened this issue Mar 9, 2024 · 1 comment
Closed

module directives: move @derive to before defstruct #134

novaugust opened this issue Mar 9, 2024 · 1 comment

Comments

@novaugust
Copy link
Contributor

fixes compiler warning

Example Input

iex(1)> defmodule Foo do
...(1)>   defstruct [:bar]
...(1)>   @derive {Inspect, only: [:bar]}
...(1)> end
warning: warning: module attribute @derive was set after defstruct, all @derive calls must come before defstruct
└─ iex:1: Foo (module)
@novaugust
Copy link
Contributor Author

cc @milmazz :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant