From 147830d1a3a2dc5748c11e41df6289655722cc4d Mon Sep 17 00:00:00 2001
From: chriseth <c@ethdev.com>
Date: Fri, 11 Sep 2015 16:36:47 +0200
Subject: [PATCH] Small fixes to the type system concerning libraries.

---
 libsolidity/Types.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libsolidity/Types.cpp b/libsolidity/Types.cpp
index 5bc7cd432..beb5becde 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));