aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-26 20:40:40 +0800
committerchriseth <c@ethdev.com>2017-01-26 20:40:40 +0800
commit525758a130941c6f1dfde8a0f884a550e7a7bb50 (patch)
tree34ac53364bc3aec20a9cc9d324d41721e9143687 /libsolidity
parentf62e269115822f791a0ad2e3699815f0725a0ef7 (diff)
downloaddexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.gz
dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.zst
dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.zip
Disallow assignment to non-identifiers.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp
index bed90139..7ddc6d04 100644
--- a/libsolidity/inlineasm/AsmParser.cpp
+++ b/libsolidity/inlineasm/AsmParser.cpp
@@ -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;