aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-02-07 11:20:39 +0100
committerHenrik Nord <[email protected]>2014-02-07 11:20:39 +0100
commit60246d149deef631366bdca8605a8cf323427cc7 (patch)
tree3003997af5a68c64cda577006e887953ef538b56 /lib
parentc958c0f0eb820842e924646de01dfd7d8bf94636 (diff)
parente4526b30228f360d2c8c894376f3856b9fc83c09 (diff)
downloadotp-60246d149deef631366bdca8605a8cf323427cc7.tar.gz
otp-60246d149deef631366bdca8605a8cf323427cc7.tar.bz2
otp-60246d149deef631366bdca8605a8cf323427cc7.zip
Merge branch 'kostis/dialyzer-r17c0-fixes'
* kostis/dialyzer-r17c0-fixes: Shut off a dialyzer unmatched return warning Add a spec for a function that does not return
Diffstat (limited to 'lib')
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl3
-rw-r--r--lib/dialyzer/src/dialyzer_typesig.erl6
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 33fa107019..03f9684b02 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -2302,6 +2302,9 @@ bind_guard_list([], Map, _Env, _Eval, _State, Acc) ->
signal_guard_fail(Eval, Guard, ArgTypes, State) ->
signal_guard_failure(Eval, Guard, ArgTypes, fail, State).
+-spec signal_guard_fatal_fail(eval(), cerl:c_call(), [erl_types:erl_type()],
+ state()) -> no_return().
+
signal_guard_fatal_fail(Eval, Guard, ArgTypes, State) ->
signal_guard_failure(Eval, Guard, ArgTypes, fatal_fail, State).
diff --git a/lib/dialyzer/src/dialyzer_typesig.erl b/lib/dialyzer/src/dialyzer_typesig.erl
index b4b3d5a092..70e14781f7 100644
--- a/lib/dialyzer/src/dialyzer_typesig.erl
+++ b/lib/dialyzer/src/dialyzer_typesig.erl
@@ -2535,8 +2535,10 @@ enter_type(Key, Val, Map) when is_integer(Key) ->
erase_type(Key, Map);
false ->
LimitedVal = t_limit(Val, ?INTERNAL_TYPE_LIMIT),
- [?debug("LimitedVal ~s\n", [format_type(LimitedVal)]) ||
- not is_equal(LimitedVal, Val)],
+ case is_equal(LimitedVal, Val) of
+ true -> ok;
+ false -> ?debug("LimitedVal ~s\n", [format_type(LimitedVal)])
+ end,
case dict:find(Key, Map) of
{ok, Value} ->
case is_equal(Value, LimitedVal) of