aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-11 22:36:47 +0800
committerchriseth <c@ethdev.com>2015-09-11 22:36:47 +0800
commit147830d1a3a2dc5748c11e41df6289655722cc4d (patch)
tree1a306a05ec5b2d33ab9a992888c7c694fd4f1bd2 /libsolidity
parentd89832fa898d18f1962eff14acf3f2f7b1c4e3bc (diff)
downloaddexon-solidity-147830d1a3a2dc5748c11e41df6289655722cc4d.tar.gz
dexon-solidity-147830d1a3a2dc5748c11e41df6289655722cc4d.tar.zst
dexon-solidity-147830d1a3a2dc5748c11e41df6289655722cc4d.zip
Small fixes to the type system concerning libraries.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/Types.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libsolidity/Types.cpp b/libsolidity/Types.cpp
index 5bc7cd43..beb5becd 100644
--- a/libsolidity/Types.cpp
+++ b/libsolidity/Types.cpp
@@ -925,7 +925,10 @@ bool ContractType::operator==(Type const& _other) 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
@@ -971,7 +974,7 @@ MemberList const& ContractType::members() const
for (auto const& it: m_contract.interfaceFunctions())
members.push_back(MemberList::Member(
it.second->declaration().name(),
- it.second->asMemberFunction(false),
+ it.second->asMemberFunction(m_contract.isLibrary()),
&it.second->declaration()
));
m_members.reset(new MemberList(members));