Small fixes to the type system concerning libraries.

This commit is contained in:
chriseth 2015-09-11 16:36:47 +02:00
parent d89832fa89
commit 147830d1a3

View File

@ -925,7 +925,10 @@ bool ContractType::operator==(Type const& _other) const
string ContractType::toString(bool) const string ContractType::toString(bool) const
{ {
return "contract " + string(m_super ? "super " : "") + m_contract.name(); return
string(m_contract.isLibrary() ? "library " : "contract ") +
string(m_super ? "super " : "") +
m_contract.name();
} }
MemberList const& ContractType::members() const MemberList const& ContractType::members() const
@ -971,7 +974,7 @@ MemberList const& ContractType::members() const
for (auto const& it: m_contract.interfaceFunctions()) for (auto const& it: m_contract.interfaceFunctions())
members.push_back(MemberList::Member( members.push_back(MemberList::Member(
it.second->declaration().name(), it.second->declaration().name(),
it.second->asMemberFunction(false), it.second->asMemberFunction(m_contract.isLibrary()),
&it.second->declaration() &it.second->declaration()
)); ));
m_members.reset(new MemberList(members)); m_members.reset(new MemberList(members));