diff options
author | chriseth <c@ethdev.com> | 2015-06-16 23:20:41 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-06-16 23:20:41 +0800 |
commit | 17efc422996979289a9c5aa02959066578b09aa8 (patch) | |
tree | 9ed79bf8f04b4bf2d16119c94a807bbbe7efd70a /Types.h | |
parent | a5664d053589bb512c1b9acba7feb6b1c6db155f (diff) | |
download | dexon-solidity-17efc422996979289a9c5aa02959066578b09aa8.tar.gz dexon-solidity-17efc422996979289a9c5aa02959066578b09aa8.tar.zst dexon-solidity-17efc422996979289a9c5aa02959066578b09aa8.zip |
Type conversion specialities for storage references.
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -202,6 +202,8 @@ public: /// This returns the corresponding integer type for IntegerConstantTypes and the pointer type /// for storage reference types. virtual TypePointer mobileType() const { return shared_from_this(); } + /// @returns true if this type is a storage pointer or reference. + virtual bool isInStorage() const { return false; } /// Returns the list of all members of this type. Default implementation: no members. virtual MemberList const& getMembers() const { return EmptyMemberList; } @@ -374,6 +376,7 @@ public: virtual TypePointer copyForLocation(Location _location, bool _isPointer) const = 0; virtual TypePointer mobileType() const override { return copyForLocation(m_location, true); } + virtual bool isInStorage() const override { return m_location == Location::Storage; } /// Storage references can be pointers or bound references. In general, local variables are of /// pointer type, state variables are bound references. Assignments to pointers or deleting |