aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/Types.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-12 01:35:31 +0800
committerchriseth <c@ethdev.com>2015-09-12 01:35:31 +0800
commit4360e0459622e7843ca9f8d7fb5113da0b8a044e (patch)
treee8f5fe5f139517c000c57fa271617621420ccb5d /libsolidity/Types.h
parent3c25420b8476f1516ac8cb10f5c1552609a08675 (diff)
parentd89832fa898d18f1962eff14acf3f2f7b1c4e3bc (diff)
downloaddexon-solidity-4360e0459622e7843ca9f8d7fb5113da0b8a044e.tar.gz
dexon-solidity-4360e0459622e7843ca9f8d7fb5113da0b8a044e.tar.zst
dexon-solidity-4360e0459622e7843ca9f8d7fb5113da0b8a044e.zip
Merge pull request #66 from chriseth/sol_libraries
Calling libraries.
Diffstat (limited to 'libsolidity/Types.h')
-rw-r--r--libsolidity/Types.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libsolidity/Types.h b/libsolidity/Types.h
index 17ae0ce0..11218b7a 100644
--- a/libsolidity/Types.h
+++ b/libsolidity/Types.h
@@ -517,7 +517,7 @@ private:
};
/**
- * The type of a contract instance, there is one distinct type for each contract definition.
+ * The type of a contract instance or library, there is one distinct type for each contract definition.
*/
class ContractType: public Type
{
@@ -788,7 +788,8 @@ public:
/// removed and the location of reference types is changed from CallData to Memory.
/// This is needed if external functions are called on other contracts, as they cannot return
/// dynamic values.
- FunctionTypePointer asMemberFunction() const;
+ /// @param _inLibrary if true, uses CallCode as location.
+ FunctionTypePointer asMemberFunction(bool _inLibrary) const;
private:
static TypePointers parseElementaryTypeVector(strings const& _types);
@@ -851,6 +852,7 @@ public:
/**
* The type of a type reference. The type of "uint32" when used in "a = uint32(2)" is an example
* of a TypeType.
+ * For super contracts or libraries, this has members directly.
*/
class TypeType: public Type
{
@@ -865,7 +867,7 @@ public:
virtual bool canBeStored() const override { return false; }
virtual u256 storageSize() const override;
virtual bool canLiveOutsideStorage() const override { return false; }
- virtual unsigned sizeOnStack() const override { return 0; }
+ virtual unsigned sizeOnStack() const override;
virtual std::string toString(bool _short) const override { return "type(" + m_actualType->toString(_short) + ")"; }
virtual MemberList const& members() const override;