aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-24 00:55:47 +0800
committerchriseth <chris@ethereum.org>2017-06-24 02:12:22 +0800
commit5a75581f6643a229ab12a861d0b0663ea3e5158e (patch)
tree729d81a12ee3aefe88a41abfc9d890f30a35edde /libsolidity/codegen/CompilerContext.cpp
parentb83f77e0e567b58c2ada831e526ad5bacfed8b40 (diff)
downloaddexon-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.cpp1
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;
}