aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/Types.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-11 01:40:07 +0800
committerchriseth <c@ethdev.com>2015-09-11 21:21:37 +0800
commit976c380b615f71c9e5b59c9b6bcadefbd79c086f (patch)
tree6ce25599b74529619f4421a9bd3db76eecb80b80 /libsolidity/Types.h
parenta9edc7b1a601747f96e47fe60a5fc10df489696f (diff)
downloaddexon-solidity-976c380b615f71c9e5b59c9b6bcadefbd79c086f.tar.gz
dexon-solidity-976c380b615f71c9e5b59c9b6bcadefbd79c086f.tar.zst
dexon-solidity-976c380b615f71c9e5b59c9b6bcadefbd79c086f.zip
Possibility to call library functions.
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;