diff options
author | Christian <c@ethdev.com> | 2015-01-08 05:54:56 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-10 01:31:36 +0800 |
commit | c5c893319285993dd9a1c6a790537e7acc35e5d0 (patch) | |
tree | feee7124a0982ca8e44d142caf6774969305829b /Types.h | |
parent | 501ad14ed1a6b1c40e0b0437683bae6246a6eeeb (diff) | |
download | dexon-solidity-c5c893319285993dd9a1c6a790537e7acc35e5d0.tar.gz dexon-solidity-c5c893319285993dd9a1c6a790537e7acc35e5d0.tar.zst dexon-solidity-c5c893319285993dd9a1c6a790537e7acc35e5d0.zip |
Contracts are Addresses.
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -179,10 +179,11 @@ public: bool isAddress() const { return m_modifier == Modifier::ADDRESS; } int isSigned() const { return m_modifier == Modifier::SIGNED; } + static const MemberList AddressMemberList; + private: int m_bits; Modifier m_modifier; - static const MemberList AddressMemberList; }; /** @@ -278,7 +279,9 @@ class ContractType: public Type public: virtual Category getCategory() const override { return Category::CONTRACT; } ContractType(ContractDefinition const& _contract): m_contract(_contract) {} - /// Contracts can be converted to themselves and to addresses. + /// Contracts can be implicitly converted to super classes and to addresses. + virtual bool isImplicitlyConvertibleTo(Type const& _convertTo) const override; + /// Contracts can be converted to themselves and to integers. virtual bool isExplicitlyConvertibleTo(Type const& _convertTo) const override; virtual bool operator==(Type const& _other) const override; virtual u256 getStorageSize() const override; @@ -291,6 +294,8 @@ public: /// is not used, as this type cannot be the type of a variable or expression. std::shared_ptr<FunctionType const> const& getConstructorType() const; + /// @returns the identifier of the function with the given name or Invalid256 if such a name does + /// not exist. u256 getFunctionIdentifier(std::string const& _functionName) const; private: |