mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Refactoring of errors and fixes for various ICEs.
This commit is contained in:
@@ -706,6 +706,9 @@ public:
|
||||
/// never change the contents of the original value.
|
||||
bool isPointer() const;
|
||||
|
||||
/// @returns true if this is valid to be stored in data location _loc
|
||||
virtual BoolResult validForLocation(DataLocation _loc) const = 0;
|
||||
|
||||
bool operator==(ReferenceType const& _other) const
|
||||
{
|
||||
return location() == _other.location() && isPointer() == _other.isPointer();
|
||||
@@ -772,8 +775,7 @@ public:
|
||||
TypePointer decodingType() const override;
|
||||
TypeResult interfaceType(bool _inLibrary) const override;
|
||||
|
||||
/// @returns true if this is valid to be stored in calldata
|
||||
bool validForCalldata() const;
|
||||
BoolResult validForLocation(DataLocation _loc) const override;
|
||||
|
||||
/// @returns true if this is a byte array or a string
|
||||
bool isByteArray() const { return m_arrayKind != ArrayKind::Ordinary; }
|
||||
@@ -827,8 +829,7 @@ public:
|
||||
bool canLiveOutsideStorage() const override { return m_arrayType.canLiveOutsideStorage(); }
|
||||
std::string toString(bool _short) const override;
|
||||
|
||||
/// @returns true if this is valid to be stored in calldata
|
||||
bool validForCalldata() const { return m_arrayType.validForCalldata(); }
|
||||
BoolResult validForLocation(DataLocation _loc) const override { return m_arrayType.validForLocation(_loc); }
|
||||
|
||||
ArrayType const& arrayType() const { return m_arrayType; }
|
||||
u256 memoryDataSize() const override { solAssert(false, ""); }
|
||||
@@ -934,6 +935,8 @@ public:
|
||||
Type const* encodingType() const override;
|
||||
TypeResult interfaceType(bool _inLibrary) const override;
|
||||
|
||||
BoolResult validForLocation(DataLocation _loc) const override;
|
||||
|
||||
bool recursive() const;
|
||||
|
||||
std::unique_ptr<ReferenceType> copyForLocation(DataLocation _location, bool _isPointer) const override;
|
||||
|
||||
Reference in New Issue
Block a user