lint_module crash on +check_untyped_records

Micah Warren <>
Thu Mar 4 17:09:39 CET 2010

Attempting to compile a module that defines a type dependant on an undefined record with the +warn_untyped_record flag causes erl_lint to crash with reason badarg. Perhaps a better behavior is to report the undefined record instead. 

This has been tested on R13B03 on OS 10.6.2. 

To reproduce the behavior: 

Create the file badmod.erl: 



-type(test() :: #arec{}).

erlc +warn_untyped_record badmod.erl

This should cause: 

badmod.erl:none: internal error in lint_module; 
crash reason: {badarg,[{dict,fetch, 

To resolve the error define #arec{}: 


-record(arc, {id :: string()}). 

-type(test() :: #arec{}).

More information about the erlang-bugs mailing list