Describe the bugtyper crashes when trying to use the --annotate-inc-files option.
To Reproduce
Create these two files:
inc.hrl
included() -> included.
mod.erl
-module(mod).
-export([exported/0]).
-include("inc.hrl").
exported() -> {not_exported(), included()}.
not_exported() -> not_exported.
2. Generate a PLT using dialyzer.
3. Run the following command…
```bash
typer --plt /path/to/your/plt --annotate-inc-files mod.erl
You'll see an error similar to…
Processing file: "mod.erl"
{"init terminating in do_boot",{{badmatch,[{"inc.hrl",{3,included,0}}]},[{typer,write_typed_file,5,[{file,"typer.erl"},{line,495}]},{typer,write_typed_file,3,[{file,"typer.erl"},{line,489}]},{typer,'-write_and_collect_inc_info/1-fun-0-',3,[{file,"typer.erl"},{line,242}]},{lists,foldl,3,[{file,"lists.erl"},{line,1267}]},{typer,write_and_collect_inc_info,1,[{file,"typer.erl"},{line,246}]},{typer,show_or_annotate,1,[{file,"typer.erl"},{line,235}]},{typer,start,0,[{file,"typer.erl"},{line,92}]},{init,start_em,1,[]}]}}
init terminating in do_boot ({{badmatch,[{[_],{_}}]},[{typer,write_typed_file,5,[{_},{_}]},{typer,write_typed_file,3,[{_},{_}]},{typer,-write_and_collect_inc_info/1-fun-0-,3,[{_},{_}]},{lists,foldl,3,
Crash dump is being written to: erl_crash.dump...done
Expected behavior
A file called typer_ann/inc.ann.hrl that looks like…
Describe the bug
typer
crashes when trying to use the--annotate-inc-files
option.To Reproduce
inc.hrl
mod.erl
-export([exported/0]).
-include("inc.hrl").
exported() -> {not_exported(), included()}.
not_exported() -> not_exported.
You'll see an error similar to…
Expected behavior A file called
typer_ann/inc.ann.hrl
that looks like…Affected versions I've experienced this issue in OTP 23.3.2 and OTP 24.0.2.
Additional context All other TypEr modes work fine…