From 44eab8e9e6d3db1a541379bc6ad15e710ec83b45 Mon Sep 17 00:00:00 2001 From: arookas Date: Mon, 21 Dec 2015 04:57:00 -0500 Subject: [PATCH] Fixed: don't recurse into function bodies when calculating maximum local counts. --- ssc/ast/nodes.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssc/ast/nodes.cs b/ssc/ast/nodes.cs index 1205916..71de4d4 100644 --- a/ssc/ast/nodes.cs +++ b/ssc/ast/nodes.cs @@ -53,7 +53,7 @@ namespace arookas { locals += child.MaxLocalCount; // HACK: compound statements aren't their own scope } - else + else if (!(child is sunFunctionDefinition)) // don't recurse into function bodies { int childLocals = child.MaxLocalCount; if (childLocals > maxChildLocals)