aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ContractCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-03-13 23:50:44 +0800
committerchriseth <chris@ethereum.org>2018-03-13 23:55:41 +0800
commit069b150e42d12f3f3736dd4af2d82881db244b66 (patch)
tree66c146443b7b4bce3f90669459af20d75748d577 /libsolidity/codegen/ContractCompiler.cpp
parent8ad0fb3be3998cf509c6329f41428fcd8d0d7de5 (diff)
downloaddexon-solidity-069b150e42d12f3f3736dd4af2d82881db244b66.tar.gz
dexon-solidity-069b150e42d12f3f3736dd4af2d82881db244b66.tar.zst
dexon-solidity-069b150e42d12f3f3736dd4af2d82881db244b66.zip
Bugfix in virtual lookup for modifiers in libraries.
Diffstat (limited to 'libsolidity/codegen/ContractCompiler.cpp')
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp
index 5a9498f0..95d6c8b5 100644
--- a/libsolidity/codegen/ContractCompiler.cpp
+++ b/libsolidity/codegen/ContractCompiler.cpp
@@ -1002,7 +1002,10 @@ void ContractCompiler::appendModifierOrFunctionCode()
appendModifierOrFunctionCode();
else
{
- ModifierDefinition const& modifier = m_context.functionModifier(modifierInvocation->name()->name());
+ ModifierDefinition const& nonVirtualModifier = dynamic_cast<ModifierDefinition const&>(
+ *modifierInvocation->name()->annotation().referencedDeclaration
+ );
+ ModifierDefinition const& modifier = m_context.resolveVirtualFunctionModifier(nonVirtualModifier);
CompilerContext::LocationSetter locationSetter(m_context, modifier);
solAssert(modifier.parameters().size() == modifierInvocation->arguments().size(), "");
for (unsigned i = 0; i < modifier.parameters().size(); ++i)