aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-11-17 07:06:57 +0800
committerchriseth <c@ethdev.com>2015-11-26 20:10:12 +0800
commit30b325fdc148d5014f04fd238362e3a1df10310f (patch)
treecd8df0c1f6e5462f2349a07d8f5f7d1fd156b4cc /libsolidity/parsing
parentcd94aa978a77ace1296f9978bfae6d8735b5c91d (diff)
downloaddexon-solidity-30b325fdc148d5014f04fd238362e3a1df10310f.tar.gz
dexon-solidity-30b325fdc148d5014f04fd238362e3a1df10310f.tar.zst
dexon-solidity-30b325fdc148d5014f04fd238362e3a1df10310f.zip
Allow "new expressions" also for general type names.
Breaking change: If you want to send value with a contract creation, you have to use parentheses now: `(new ContractName).value(2 ether)(arg1, arg2)`
Diffstat (limited to 'libsolidity/parsing')
-rw-r--r--libsolidity/parsing/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp
index d89218bb..c703ef27 100644
--- a/libsolidity/parsing/Parser.cpp
+++ b/libsolidity/parsing/Parser.cpp
@@ -939,7 +939,7 @@ ASTPointer<Expression> Parser::parseLeftHandSideExpression(
else if (m_scanner->currentToken() == Token::New)
{
expectToken(Token::New);
- ASTPointer<Identifier> contractName(parseIdentifier());
+ ASTPointer<TypeName> contractName(parseTypeName(false));
nodeFactory.setEndPositionFromNode(contractName);
expression = nodeFactory.createNode<NewExpression>(contractName);
}