aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_dataflow.erl
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2016-06-01 20:48:58 +0200
committerJosé Valim <[email protected]>2016-09-26 11:15:03 +0200
commitb8d1855529236e9d8320bff326d30aefae518354 (patch)
tree080374c28ab7cddbec2907fffa86cd499704734a /lib/dialyzer/src/dialyzer_dataflow.erl
parent7228e3ea97f8e2a19be97740053892e67cc20baf (diff)
downloadotp-b8d1855529236e9d8320bff326d30aefae518354.tar.gz
otp-b8d1855529236e9d8320bff326d30aefae518354.tar.bz2
otp-b8d1855529236e9d8320bff326d30aefae518354.zip
Use @ in variable names generated by core and kernel
The previous variable names can be generated by projects like LFE and Elixir, leading to possible conflicts. Our first to choice to solve such conflicts was to use $ but that's not a valid variable name in core. Therefore we picked @ which is currently supported and still reduces the chance of conflicts.
Diffstat (limited to 'lib/dialyzer/src/dialyzer_dataflow.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 963c953447..c0372a47e8 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -3585,6 +3585,7 @@ format_arg(Arg) ->
case cerl:var_name(Arg) of
Atom when is_atom(Atom) ->
case atom_to_list(Atom) of
+ "@"++_ -> Default;
"cor"++_ -> Default;
"rec"++_ -> Default;
Name -> Name ++ "::"
@@ -3645,6 +3646,7 @@ map_pats(Pats) ->
case cerl:var_name(Tree) of
Atom when is_atom(Atom) ->
case atom_to_list(Atom) of
+ "@"++_ -> cerl:c_var('');
"cor"++_ -> cerl:c_var('');
"rec"++_ -> cerl:c_var('');
_ -> cerl:set_ann(Tree, [])