aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/typer/src/typer_annotator.erl4
-rw-r--r--lib/typer/vsn.mk2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/typer/src/typer_annotator.erl b/lib/typer/src/typer_annotator.erl
index 17eeeb6dfe..a68360604d 100644
--- a/lib/typer/src/typer_annotator.erl
+++ b/lib/typer/src/typer_annotator.erl
@@ -227,6 +227,8 @@ get_type({{M, F, A} = MFA, Range, Arg}, CodeServer, RecMap) ->
Sig = erl_types:t_fun(Arg, Range),
case dialyzer_contracts:check_contract(Contract, Sig) of
ok -> {{F, A}, {contract, Contract}};
+ {error, {extra_range, _, _}} ->
+ {{F, A}, {contract, Contract}};
{error, invalid_contract} ->
CString = dialyzer_contracts:contract_to_string(Contract),
SigString = dialyzer_utils:format_sig(Sig, RecMap),
@@ -235,7 +237,7 @@ get_type({{M, F, A} = MFA, Range, Arg}, CodeServer, RecMap) ->
"\t The contract is: " ++ CString ++ "\n" ++
"\t but the inferred signature is: ~s",
[M, F, A, SigString]));
- {error, Msg} ->
+ {error, Msg} when is_list(Msg) -> % Msg is a string()
typer:error(
io_lib:format("Error in contract of function ~w:~w/~w: ~s",
[M, F, A, Msg]))
diff --git a/lib/typer/vsn.mk b/lib/typer/vsn.mk
index 9558412375..285fa62da3 100644
--- a/lib/typer/vsn.mk
+++ b/lib/typer/vsn.mk
@@ -1 +1 @@
-TYPER_VSN = 0.1.7.3
+TYPER_VSN = 0.1.7.4