Fixed memory corruption bug caused by GC
This commit is contained in:
parent
b105a0f6a2
commit
5df5716993
|
@ -3564,12 +3564,14 @@ invariant() foo();
|
|||
m.scriptLine = advance();
|
||||
if (currentIs(tok!"module"))
|
||||
m.moduleDeclaration = parseModuleDeclaration();
|
||||
Declaration[] declarations;
|
||||
while (moreTokens())
|
||||
{
|
||||
auto declaration = parseDeclaration();
|
||||
if (declaration !is null)
|
||||
m.declarations ~= declaration;
|
||||
declarations ~= declaration;
|
||||
}
|
||||
m.declarations = ownArray(declarations);
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue