Disallow several indexed attributes for the same event parameter

This commit is contained in:
vlad
2023-01-20 19:53:02 +01:00
committed by Kamil Śliwak
parent c195782f96
commit 6a0ea174b8
3 changed files with 15 additions and 0 deletions
+5
View File
@@ -785,7 +785,12 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(
else
{
if (_options.allowIndexed && token == Token::Indexed)
{
if (isIndexed)
parserError(5399_error, "Indexed already specified.");
isIndexed = true;
}
else if (token == Token::Constant || token == Token::Immutable)
{
if (mutability != VariableDeclaration::Mutability::Mutable)