mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
parsing: ban empty enum definition.
This commit is contained in:
@@ -406,6 +406,8 @@ ASTPointer<EnumDefinition> Parser::parseEnumDefinition()
|
||||
if (m_scanner->currentToken() != Token::Identifier)
|
||||
fatalParserError(string("Expected Identifier after ','"));
|
||||
}
|
||||
if (members.size() == 0)
|
||||
parserError({"enum with no members is not allowed."});
|
||||
|
||||
nodeFactory.markEndPosition();
|
||||
expectToken(Token::RBrace);
|
||||
|
||||
Reference in New Issue
Block a user