aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-04-10 17:22:26 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-04-10 18:09:34 +0800
commit3eedbc6a9c60888dd967d6673a34511947da4aa1 (patch)
tree0a6e356f44df3763acb57327b34ae621f80cf068 /libsolidity/parsing
parentb52614116e9c72d840b375b0bbb1c56a63df3680 (diff)
downloaddexon-solidity-3eedbc6a9c60888dd967d6673a34511947da4aa1.tar.gz
dexon-solidity-3eedbc6a9c60888dd967d6673a34511947da4aa1.tar.zst
dexon-solidity-3eedbc6a9c60888dd967d6673a34511947da4aa1.zip
Error when using no parentheses in modifier-style constructor calls.
Diffstat (limited to 'libsolidity/parsing')
-rw-r--r--libsolidity/parsing/Parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp
index 9a7731d8..18ef740a 100644
--- a/libsolidity/parsing/Parser.cpp
+++ b/libsolidity/parsing/Parser.cpp
@@ -701,17 +701,17 @@ ASTPointer<ModifierInvocation> Parser::parseModifierInvocation()
RecursionGuard recursionGuard(*this);
ASTNodeFactory nodeFactory(*this);
ASTPointer<Identifier> name(parseIdentifier());
- vector<ASTPointer<Expression>> arguments;
+ unique_ptr<vector<ASTPointer<Expression>>> arguments;
if (m_scanner->currentToken() == Token::LParen)
{
m_scanner->next();
- arguments = parseFunctionCallListArguments();
+ arguments.reset(new vector<ASTPointer<Expression>>(parseFunctionCallListArguments()));
nodeFactory.markEndPosition();
expectToken(Token::RParen);
}
else
nodeFactory.setEndPositionFromNode(name);
- return nodeFactory.createNode<ModifierInvocation>(name, arguments);
+ return nodeFactory.createNode<ModifierInvocation>(name, move(arguments));
}
ASTPointer<Identifier> Parser::parseIdentifier()