Fix accessing libraries inside modules.

This commit is contained in:
chriseth 2021-01-14 14:05:41 +01:00
parent 2a62814686
commit a65415cdad
2 changed files with 6 additions and 0 deletions

View File

@ -1985,6 +1985,11 @@ void IRGeneratorForStatements::endVisit(MemberAccess const& _memberAccess)
if (!_memberAccess.annotation().calledDirectly)
m_context.addToInternalDispatch(*function);
}
else if (auto const* contract = dynamic_cast<ContractDefinition const*>(_memberAccess.annotation().referencedDeclaration))
{
if (contract->isLibrary())
define(IRVariable(_memberAccess).part("address")) << linkerSymbol(*contract) << "\n";
}
break;
}
default:

View File

@ -39,6 +39,7 @@ contract C {
}
}
// ====
// compileViaYul: also
// EVMVersion: >=byzantium
// ----
// library: L