Disallow usage of the indexed attribute for modifier parameters Added tests for edge cases of several keywords

This commit is contained in:
vlad
2023-01-20 19:53:02 +01:00
committed by Kamil Śliwak
parent 6a0ea174b8
commit 7fbd36855d
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -23,6 +23,7 @@ Compiler Features:
Bugfixes:
* Parser: Disallow several ``indexed`` attributes for the same event parameter.
* Parser: Disallow usage of the ``indexed`` attribute for modifier parameters.
* Yul Optimizer: Hash hex and decimal literals according to their value instead of their representation, improving the detection of equivalent functions.
* Solidity Upgrade Tool ``solidity-upgrade``: Fix the tool returning success code on uncaught exceptions.
* SMTChecker: Fix display error for negative integers that are one more than powers of two.
-1
View File
@@ -879,7 +879,6 @@ ASTPointer<ModifierDefinition> Parser::parseModifierDefinition()
if (m_scanner->currentToken() == Token::LParen)
{
VarDeclParserOptions options;
options.allowIndexed = true;
options.allowLocationSpecifier = true;
parameters = parseParameterList(options);
}
@@ -0,0 +1,5 @@
contract B {
modifier mod1(uint indexed a) { _; }
}
// ----
// ParserError 2314: (36-43): Expected ',' but got 'indexed'