diff options
author | chriseth <c@ethdev.com> | 2017-01-26 20:40:40 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-26 20:40:40 +0800 |
commit | 525758a130941c6f1dfde8a0f884a550e7a7bb50 (patch) | |
tree | 34ac53364bc3aec20a9cc9d324d41721e9143687 /libsolidity/inlineasm | |
parent | f62e269115822f791a0ad2e3699815f0725a0ef7 (diff) | |
download | dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.gz dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.bz2 dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.lz dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.xz dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.tar.zst dexon-solidity-525758a130941c6f1dfde8a0f884a550e7a7bb50.zip |
Disallow assignment to non-identifiers.
Diffstat (limited to 'libsolidity/inlineasm')
-rw-r--r-- | libsolidity/inlineasm/AsmParser.cpp | 2 |
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; |