aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2014-01-31 12:06:51 +0200
committerKostis Sagonas <[email protected]>2014-01-31 12:06:51 +0200
commite4526b30228f360d2c8c894376f3856b9fc83c09 (patch)
treeeda5d4e07baeb808aead9d4fe70ab3f01b1a6c85
parentf2e972853268e847cfb28eed4193c0bb699e9718 (diff)
downloadotp-e4526b30228f360d2c8c894376f3856b9fc83c09.tar.gz
otp-e4526b30228f360d2c8c894376f3856b9fc83c09.tar.bz2
otp-e4526b30228f360d2c8c894376f3856b9fc83c09.zip
Shut off a dialyzer unmatched return warning
Dialyzer does not like list comprehensions for which the result is not assigned to some variable (maybe anonymous). In this particular case, the comprehension, containing only a filter but no generator, was used to save some lines, but IMO this type of code, while "cute", is not so easy to comprehend.
-rw-r--r--lib/dialyzer/src/dialyzer_typesig.erl6
1 files changed, 4 insertions, 2 deletions
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