mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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)`
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user