mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow assignment to non-identifiers.
This commit is contained in:
@@ -71,6 +71,8 @@ assembly::Statement Parser::parseStatement()
|
||||
expectToken(Token::Colon);
|
||||
assignment.variableName.location = location();
|
||||
assignment.variableName.name = m_scanner->currentLiteral();
|
||||
if (instructions().count(assignment.variableName.name))
|
||||
fatalParserError("Identifier expected.");
|
||||
assignment.location.end = endPosition();
|
||||
expectToken(Token::Identifier);
|
||||
return assignment;
|
||||
|
||||
Reference in New Issue
Block a user