Fixed: don't recurse into function bodies when calculating maximum local counts.
This commit is contained in:
parent
694210cd5a
commit
44eab8e9e6
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ namespace arookas
|
||||||
{
|
{
|
||||||
locals += child.MaxLocalCount; // HACK: compound statements aren't their own scope
|
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;
|
int childLocals = child.MaxLocalCount;
|
||||||
if (childLocals > maxChildLocals)
|
if (childLocals > maxChildLocals)
|
||||||
|
|
Loading…
Add table
Reference in a new issue