Merge pull request #9169 from WalterBright/copyLiteral

don't need to copy the result of copyLiteral()
merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
This commit is contained in:
The Dlang Bot 2019-01-01 06:25:40 +01:00 committed by GitHub
commit 3a4398aad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2740,7 +2740,10 @@ public:
result = e;
}
else
result = copyLiteral(e).copy();
{
*pue = copyLiteral(e);
result = pue.exp();
}
}
override void visit(AssocArrayLiteralExp e)
@ -2823,7 +2826,10 @@ public:
result = aae;
}
else
result = copyLiteral(e).copy();
{
*pue = copyLiteral(e);
result = pue.exp();
}
}
override void visit(StructLiteralExp e)
@ -2910,7 +2916,10 @@ public:
result = sle;
}
else
result = copyLiteral(e).copy();
{
*pue = copyLiteral(e);
result = pue.exp();
}
}
// Create an array literal of type 'newtype' with dimensions given by