Browse Source

restyleing

removed unnecessary check
cl-refactor
Liana Husikyan 10 years ago
parent
commit
581cd68fcf
  1. 3
      libsolidity/AST.h
  2. 3
      libsolidity/Parser.cpp

3
libsolidity/AST.h

@ -450,7 +450,8 @@ public:
Visibility _visibility, Visibility _visibility,
bool _isStateVar = false, bool _isStateVar = false,
bool _isIndexed = false, bool _isIndexed = false,
bool _isConstant = false): bool _isConstant = false
):
Declaration(_location, _name, _visibility), Declaration(_location, _name, _visibility),
m_typeName(_type), m_typeName(_type),
m_value(_value), m_value(_value),

3
libsolidity/Parser.cpp

@ -330,9 +330,6 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(
} }
if (token == Token::Const) 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; isDeclaredConst = true;
m_scanner->next(); m_scanner->next();
} }

Loading…
Cancel
Save