aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/ms_transform.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2012-08-26 14:00:17 +0200
committerAnthony Ramine <[email protected]>2014-06-15 14:47:08 +0200
commitd9c3d4eed173e34e3651d6a9f8790c6fa573574c (patch)
tree70f820ee5bd73521e972897a044fff15e752fb0b /lib/stdlib/src/ms_transform.erl
parent07b8f441ca711f9812fad9e9115bab3c3aa92f79 (diff)
downloadotp-d9c3d4eed173e34e3651d6a9f8790c6fa573574c.tar.gz
otp-d9c3d4eed173e34e3651d6a9f8790c6fa573574c.tar.bz2
otp-d9c3d4eed173e34e3651d6a9f8790c6fa573574c.zip
Fix locations of shadowing warnings in ms_transform
A shadowed variable in an ms_transform match expression emits a warning located at the match expression instead of the variable.
Diffstat (limited to 'lib/stdlib/src/ms_transform.erl')
-rw-r--r--lib/stdlib/src/ms_transform.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl
index 27dfcf52e1..97564e2e44 100644
--- a/lib/stdlib/src/ms_transform.erl
+++ b/lib/stdlib/src/ms_transform.erl
@@ -725,10 +725,10 @@ transform_head([V],OuterBound) ->
th(NewV,NewBind,OuterBound).
-toplevel_head_match({match,Line,{var,_,VName},Expr},B,OB) ->
+toplevel_head_match({match,_,{var,Line,VName},Expr},B,OB) ->
warn_var_clash(Line,VName,OB),
{Expr,new_bind({VName,'$_'},B)};
-toplevel_head_match({match,Line,Expr,{var,_,VName}},B,OB) ->
+toplevel_head_match({match,_,Expr,{var,Line,VName}},B,OB) ->
warn_var_clash(Line,VName,OB),
{Expr,new_bind({VName,'$_'},B)};
toplevel_head_match(Other,B,_OB) ->