aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/typer/src/typer.hrl1
-rw-r--r--lib/typer/src/typer_info.erl6
-rw-r--r--lib/typer/src/typer_options.erl6
3 files changed, 11 insertions, 2 deletions
diff --git a/lib/typer/src/typer.hrl b/lib/typer/src/typer.hrl
index 2e4ec4f894..eb3ba5f9c1 100644
--- a/lib/typer/src/typer.hrl
+++ b/lib/typer/src/typer.hrl
@@ -36,6 +36,7 @@
callgraph = dialyzer_callgraph:new() :: dialyzer_callgraph:callgraph(),
ana_files = [] :: [file:filename()], % absolute filenames
plt = none :: 'none' | file:filename(),
+ no_spec = false :: boolean(),
%% Esp for TypEr
%% ----------------------
diff --git a/lib/typer/src/typer_info.erl b/lib/typer/src/typer_info.erl
index 7fc1ba8ad0..df0b4448f3 100644
--- a/lib/typer/src/typer_info.erl
+++ b/lib/typer/src/typer_info.erl
@@ -108,7 +108,11 @@ analyze_core_tree(Core, Records, SpecInfo, ExpTypes, Analysis, File) ->
CS2 = dialyzer_codeserver:insert(Module, Tree, CS1),
CS3 = dialyzer_codeserver:set_next_core_label(NewLabel, CS2),
CS4 = dialyzer_codeserver:store_temp_records(Module, Records, CS3),
- CS5 = dialyzer_codeserver:store_temp_contracts(Module, SpecInfo, CS4),
+ CS5 =
+ case Analysis#typer_analysis.no_spec of
+ true -> CS4;
+ false -> dialyzer_codeserver:store_temp_contracts(Module, SpecInfo, CS4)
+ end,
OldExpTypes = dialyzer_codeserver:get_temp_exported_types(CS5),
MergedExpTypes = sets:union(ExpTypes, OldExpTypes),
CS6 = dialyzer_codeserver:insert_temp_exported_types(MergedExpTypes, CS5),
diff --git a/lib/typer/src/typer_options.erl b/lib/typer/src/typer_options.erl
index f149c937c7..c0f4260f19 100644
--- a/lib/typer/src/typer_options.erl
+++ b/lib/typer/src/typer_options.erl
@@ -60,6 +60,7 @@ analyze_args(ArgList, Args, Analysis) ->
cl(["-h"|_]) -> help_message();
cl(["--help"|_]) -> help_message();
+cl(["--no_spec"|Opts]) -> {no_spec, Opts};
cl(["-v"|_]) -> version_message();
cl(["--version"|_]) -> version_message();
cl(["--comments"|Opts]) -> {comments, Opts};
@@ -131,7 +132,10 @@ analyze_result({inc, Val}, Args, Analysis) ->
NewVal = Analysis#typer_analysis.includes ++ [Val],
{Args, Analysis#typer_analysis{includes = NewVal}};
analyze_result({plt, Plt}, Args, Analysis) ->
- {Args, Analysis#typer_analysis{plt = Plt}}.
+ {Args, Analysis#typer_analysis{plt = Plt}};
+analyze_result(no_spec, Args, Analysis) ->
+ {Args, Analysis#typer_analysis{no_spec = true}}.
+
%%--------------------------------------------------------------------