mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow usage of the indexed attribute for modifier parameters Added tests for edge cases of several keywords
This commit is contained in:
parent
6a0ea174b8
commit
7fbd36855d
@ -23,6 +23,7 @@ Compiler Features:
|
|||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
* Parser: Disallow several ``indexed`` attributes for the same event parameter.
|
* 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.
|
* 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.
|
* 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.
|
* SMTChecker: Fix display error for negative integers that are one more than powers of two.
|
||||||
|
@ -879,7 +879,6 @@ ASTPointer<ModifierDefinition> Parser::parseModifierDefinition()
|
|||||||
if (m_scanner->currentToken() == Token::LParen)
|
if (m_scanner->currentToken() == Token::LParen)
|
||||||
{
|
{
|
||||||
VarDeclParserOptions options;
|
VarDeclParserOptions options;
|
||||||
options.allowIndexed = true;
|
|
||||||
options.allowLocationSpecifier = true;
|
options.allowLocationSpecifier = true;
|
||||||
parameters = parseParameterList(options);
|
parameters = parseParameterList(options);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
contract B {
|
||||||
|
modifier mod1(uint indexed a) { _; }
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// ParserError 2314: (36-43): Expected ',' but got 'indexed'
|
Loading…
Reference in New Issue
Block a user