diff options
author | chriseth <chris@ethereum.org> | 2017-06-24 00:55:47 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-06-24 02:12:22 +0800 |
commit | 5a75581f6643a229ab12a861d0b0663ea3e5158e (patch) | |
tree | 729d81a12ee3aefe88a41abfc9d890f30a35edde /libsolidity/codegen/CompilerContext.cpp | |
parent | b83f77e0e567b58c2ada831e526ad5bacfed8b40 (diff) | |
download | dexon-solidity-5a75581f6643a229ab12a861d0b0663ea3e5158e.tar.gz dexon-solidity-5a75581f6643a229ab12a861d0b0663ea3e5158e.tar.zst dexon-solidity-5a75581f6643a229ab12a861d0b0663ea3e5158e.zip |
Disallow invoking the same modifier multiple times.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.cpp')
-rw-r--r-- | libsolidity/codegen/CompilerContext.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp index 9d0d6d37..729fb9cc 100644 --- a/libsolidity/codegen/CompilerContext.cpp +++ b/libsolidity/codegen/CompilerContext.cpp @@ -124,6 +124,7 @@ void CompilerContext::addVariable(VariableDeclaration const& _declaration, unsigned _offsetToCurrent) { solAssert(m_asm->deposit() >= 0 && unsigned(m_asm->deposit()) >= _offsetToCurrent, ""); + solAssert(m_localVariables.count(&_declaration) == 0, "Variable already present"); m_localVariables[&_declaration] = unsigned(m_asm->deposit()) - _offsetToCurrent; } |