[erlang-questions] Dialyzer type specifications for macros with bitstrings makes erlc barf

Sachin Panemangalore <>
Fri Mar 18 05:53:06 CET 2016


1. The following compiles fine in Erlang.

-define(MY_INT_MACRO, 1).

-define(MY_INT_MACRO, 2).

-type my_type() :: ?MY_INT_MACRO1 |  ?MY_INT_ MACRO2 .


2. The following doesn't

-define(MY_BITSTRING_MACRO, <<"01">>).

-define(MY_BITSTRING_MACRO, <<"02">>).

-type my_type() :: ?MY_BITSTRING_MACRO1 |  ?MY_BITSTRING_ MACRO2 .


Why ? and is there a way to make this work ?


Regards

sachin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160317/d222657f/attachment.html>


More information about the erlang-questions mailing list