diff --git a/libsolidity/AST.h b/libsolidity/AST.h index bedba396d..f5f6a3f38 100644 --- a/libsolidity/AST.h +++ b/libsolidity/AST.h @@ -443,14 +443,15 @@ class VariableDeclaration: public Declaration { public: VariableDeclaration( - SourceLocation const& _location, - ASTPointer const& _type, - ASTPointer const& _name, - ASTPointer _value, - Visibility _visibility, - bool _isStateVar = false, - bool _isIndexed = false, - bool _isConstant = false): + SourceLocation const& _location, + ASTPointer const& _type, + ASTPointer const& _name, + ASTPointer _value, + Visibility _visibility, + bool _isStateVar = false, + bool _isIndexed = false, + bool _isConstant = false + ): Declaration(_location, _name, _visibility), m_typeName(_type), m_value(_value), diff --git a/libsolidity/Parser.cpp b/libsolidity/Parser.cpp index 9e299215c..459a34bd0 100644 --- a/libsolidity/Parser.cpp +++ b/libsolidity/Parser.cpp @@ -330,9 +330,6 @@ ASTPointer 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(); }