aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_races.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-06-17 16:26:06 +0200
committerHans Bolinder <[email protected]>2014-06-17 16:26:06 +0200
commit805f9c89fc01220bc1bb0f27e1b68fd4eca688ba (patch)
treef0245c6d3dbfc058318bb11fced75f4bac276c8b /lib/dialyzer/src/dialyzer_races.erl
parente2961080386045f3e4ef59d9895b680ccdc4fbe4 (diff)
parent4b27326bcfa9733c5f0870a4c8476892bf8fac66 (diff)
downloadotp-805f9c89fc01220bc1bb0f27e1b68fd4eca688ba.tar.gz
otp-805f9c89fc01220bc1bb0f27e1b68fd4eca688ba.tar.bz2
otp-805f9c89fc01220bc1bb0f27e1b68fd4eca688ba.zip
Merge branch 'hb/dialyzer/fix_recognition_of_records/OTP-11935' into maint
* hb/dialyzer/fix_recognition_of_records/OTP-11935: [dialyzer] Correct a doc bug introduced in 0b041238 [dialyzer] Use the option 'dialyzer' to control the compiler [dialyzer] Fix handling of literal records
Diffstat (limited to 'lib/dialyzer/src/dialyzer_races.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_races.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/dialyzer/src/dialyzer_races.erl b/lib/dialyzer/src/dialyzer_races.erl
index 28c2ad2c0b..2a8aba5d8f 100644
--- a/lib/dialyzer/src/dialyzer_races.erl
+++ b/lib/dialyzer/src/dialyzer_races.erl
@@ -1848,7 +1848,8 @@ ets_tuple_argtypes1(Str, Tuple, TupleList, NestingLevel) ->
end.
format_arg(?bypassed) -> ?no_label;
-format_arg(Arg) ->
+format_arg(Arg0) ->
+ Arg = cerl:fold_literal(Arg0),
case cerl:type(Arg) of
var -> cerl_trees:get_label(Arg);
tuple -> list_to_tuple([format_arg(A) || A <- cerl:tuple_es(Arg)]);
@@ -1878,7 +1879,7 @@ format_args_1([Arg|Args], [Type|Types], CleanState) ->
case Arg =:= ?bypassed of
true -> [?no_label, format_type(Type, CleanState)];
false ->
- case cerl:is_literal(Arg) of
+ case cerl:is_literal(cerl:fold_literal(Arg)) of
true -> [?no_label, format_cerl(Arg)];
false -> [format_arg(Arg), format_type(Type, CleanState)]
end
@@ -2148,7 +2149,8 @@ race_var_map_guard_helper1(Arg, Pats, RaceVarMap, Op) ->
end
end.
-race_var_map_guard_helper2(Arg, Pat, Bool, RaceVarMap, Op) ->
+race_var_map_guard_helper2(Arg, Pat0, Bool, RaceVarMap, Op) ->
+ Pat = cerl:fold_literal(Pat0),
case cerl:type(Pat) of
literal ->
[Arg1, Arg2] = cerl:call_args(Arg),