type attribute pp bug
Tony Rogvall
tony@REDACTED
Fri Nov 6 15:47:39 CET 2009
Hi!
Found a "small" bug in erl_pp handling of the type declaration.
The "code" compiles, but with -E flag will result in a crash.
-module(type_bug).
-type foo() :: integer().
> erlc -E type_bug.erl
./type_bug.erl:none: internal error in listing;
crash reason: {function_clause,
[{erl_pp,typeattr,
[type,[{foo,{type,4,integer,[]},[]}],none]},
{erl_pp,lattribute,2},
{erl_pp,form,2},
{compile,'-src_listing/2-anonymous-0-',2},
{lists,foreach,2},
{compile,listing,3},
{compile,'-internal_comp/4-anonymous-1-',2},
{compile,fold_comp,3}]}
./type_bug.erl:4: Warning: type foo() is unused
/Tony
More information about the erlang-questions
mailing list