ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
735 stars 120 forks source link

The erlang plugin cannot resolve/evaluate the record definiton, if a macro is used within the record definition. #933

Open leobm opened 3 years ago

leobm commented 3 years ago
-define(ELEMENT_BASE(Module),
  module=Module           :: atom(),
  id                      :: id(),
  class=""                :: class() | [class()],
  style=""                :: text()
).

-record(button, {?ELEMENT_BASE(element_button),
  text = "" :: text(),
  body = "" :: body()
}).

test() ->   #button{id=button, text = "submit"}.

The erlang plugin cannot resolve/evaluate the record definiton, if a macro is used within the record definition. For example, in the button example, the id field cannot be resolved.