]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix ast cleaning scoping
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Sat, 9 May 2020 16:40:30 +0000 (18:40 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Sat, 9 May 2020 16:40:30 +0000 (18:40 +0200)
src/clean.c

index e1e581076e54ac0a3d82d1ec244f2ee1baccc1f4..19bb6d9172237f301a3c990be2bd6907b09b4800 100644 (file)
@@ -276,8 +276,8 @@ ANN static void clean_func_base(Clean *a, Func_Base *b) {
 }
 
 ANN static void clean_func_def(Clean *a, Func_Def b) {
-  ++a->scope;
   clean_func_base(a, b->base);
+  ++a->scope;
   if(b->d.code && !GET_FLAG(b, builtin))
     clean_stmt(a, b->d.code);
   --a->scope;