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)