mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
restyleing
removed unnecessary check
This commit is contained in:
parent
ebb4d5e298
commit
27a89a36e1
17
AST.h
17
AST.h
@ -443,14 +443,15 @@ class VariableDeclaration: public Declaration
|
||||
{
|
||||
public:
|
||||
VariableDeclaration(
|
||||
SourceLocation const& _location,
|
||||
ASTPointer<TypeName> const& _type,
|
||||
ASTPointer<ASTString> const& _name,
|
||||
ASTPointer<Expression> _value,
|
||||
Visibility _visibility,
|
||||
bool _isStateVar = false,
|
||||
bool _isIndexed = false,
|
||||
bool _isConstant = false):
|
||||
SourceLocation const& _location,
|
||||
ASTPointer<TypeName> const& _type,
|
||||
ASTPointer<ASTString> const& _name,
|
||||
ASTPointer<Expression> _value,
|
||||
Visibility _visibility,
|
||||
bool _isStateVar = false,
|
||||
bool _isIndexed = false,
|
||||
bool _isConstant = false
|
||||
):
|
||||
Declaration(_location, _name, _visibility),
|
||||
m_typeName(_type),
|
||||
m_value(_value),
|
||||
|
@ -330,9 +330,6 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(
|
||||
}
|
||||
if (token == Token::Const)
|
||||
{
|
||||
solAssert(_options.isStateVariable, "");
|
||||
if (m_scanner->peekNextToken() != Token::Identifier && !Token::isElementaryTypeName(m_scanner->peekNextToken()))
|
||||
BOOST_THROW_EXCEPTION(createParserError("Invalid use of \"constant\" specifier"));
|
||||
isDeclaredConst = true;
|
||||
m_scanner->next();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user