diff options
Diffstat (limited to 'libsolidity/Types.h')
-rw-r--r-- | libsolidity/Types.h | 8 |
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; |