Fix ASTQualifiedAsterisk cloning

This commit is contained in:
Raúl Marín 2023-01-31 14:02:46 +01:00
parent 9f4658151e
commit bacfe7ffa5

View File

@ -17,8 +17,13 @@ public:
ASTPtr clone() const override ASTPtr clone() const override
{ {
auto clone = std::make_shared<ASTQualifiedAsterisk>(*this); auto clone = std::make_shared<ASTQualifiedAsterisk>(*this);
clone->children.clear();
if (transformers) { clone->transformers = transformers->clone(); clone->children.push_back(clone->transformers); } if (transformers)
{
clone->transformers = transformers->clone();
clone->children.push_back(clone->transformers);
}
clone->qualifier = qualifier->clone(); clone->qualifier = qualifier->clone();
clone->children.push_back(clone->qualifier); clone->children.push_back(clone->qualifier);