aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-05-09 15:29:33 +0200
committerBjörn Gustavsson <[email protected]>2018-08-17 09:50:57 +0200
commit44ee726f87130ef65af350d00300384c36595b2f (patch)
treeaf70db9eba599baac8c827f9cf592c63e6b21433 /lib
parentb4b287de9f361e78042c79404a808ba1ab2819c1 (diff)
downloadotp-44ee726f87130ef65af350d00300384c36595b2f.tar.gz
otp-44ee726f87130ef65af350d00300384c36595b2f.tar.bz2
otp-44ee726f87130ef65af350d00300384c36595b2f.zip
v3_core: Number argument variables in ascending order
Nicer to read and less confusion.
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/src/v3_core.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index 3b746ab5bf..5aaf5bfd51 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -228,7 +228,8 @@ function({function,_,Name,Arity,Cs0}, Ws0, File, Opts) ->
body(Cs0, Name, Arity, St0) ->
Anno = lineno_anno(element(2, hd(Cs0)), St0),
- {Args,St1} = new_vars(Anno, Arity, St0),
+ {Args0,St1} = new_vars(Anno, Arity, St0),
+ Args = reverse(Args0), %Nicer order
case clauses(Cs0, St1) of
{Cs1,[],St2} ->
{Ps,St3} = new_vars(Arity, St2), %Need new variables here