From 30b325fdc148d5014f04fd238362e3a1df10310f Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 17 Nov 2015 00:06:57 +0100 Subject: 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)` --- libsolidity/parsing/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/parsing/Parser.cpp') 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 Parser::parseLeftHandSideExpression( else if (m_scanner->currentToken() == Token::New) { expectToken(Token::New); - ASTPointer contractName(parseIdentifier()); + ASTPointer contractName(parseTypeName(false)); nodeFactory.setEndPositionFromNode(contractName); expression = nodeFactory.createNode(contractName); } -- cgit v1.2.3 From e06768e8b580d009b9a9905f70ae2d8814699115 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 26 Nov 2015 14:47:28 +0100 Subject: Fix MSVC errors and warnings. --- libsolidity/parsing/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/parsing/Parser.cpp') diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index c703ef27..2d4ca43e 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -88,7 +88,7 @@ ASTPointer Parser::parse(shared_ptr const& _scanner) } return nodeFactory.createNode(nodes); } - catch (FatalError const& _error) + catch (FatalError const&) { if (m_errors.empty()) throw; // Something is weird here, rather throw again. -- cgit v1.2.3