aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-16 23:20:41 +0800
committerchriseth <c@ethdev.com>2015-06-16 23:20:41 +0800
commit17efc422996979289a9c5aa02959066578b09aa8 (patch)
tree9ed79bf8f04b4bf2d16119c94a807bbbe7efd70a /Types.h
parenta5664d053589bb512c1b9acba7feb6b1c6db155f (diff)
downloaddexon-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Types.h b/Types.h
index 0f86ac95..70f7807c 100644
--- a/Types.h
+++ b/Types.h
@@ -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