From 7c7c2baa82ec2fa0535381c2ea3418b8623a9062 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 27 Jul 2017 11:52:42 +0200 Subject: Re-allow multiple modifiers per function. --- libsolidity/codegen/CompilerContext.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libsolidity/codegen/CompilerContext.h') diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index 1968c1e1..13821f67 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -272,7 +272,10 @@ private: /// Storage offsets of state variables std::map> m_stateVariables; /// Offsets of local variables on the stack (relative to stack base). - std::map m_localVariables; + /// This needs to be a stack because if a modifier contains a local variable and this + /// modifier is applied twice, the position of the variable needs to be restored + /// after the nested modifier is left. + std::map> m_localVariables; /// List of current inheritance hierarchy from derived to base. std::vector m_inheritanceHierarchy; /// Stack of current visited AST nodes, used for location attachment -- cgit v1.2.3