mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Issue error properly for oversized arrays for calldata
This commit is contained in:
@@ -616,6 +616,9 @@ public:
|
||||
virtual TypePointer interfaceType(bool _inLibrary) const override;
|
||||
virtual bool canBeUsedExternally(bool _inLibrary) const override;
|
||||
|
||||
/// @returns true if this is valid to be stored in calldata
|
||||
bool validForCalldata() const;
|
||||
|
||||
/// @returns true if this is a byte array or a string
|
||||
bool isByteArray() const { return m_arrayKind != ArrayKind::Ordinary; }
|
||||
/// @returns true if this is a string
|
||||
@@ -630,6 +633,8 @@ private:
|
||||
/// String is interpreted as a subtype of Bytes.
|
||||
enum class ArrayKind { Ordinary, Bytes, String };
|
||||
|
||||
bigint unlimitedCalldataEncodedSize(bool _padded) const;
|
||||
|
||||
///< Byte arrays ("bytes") and strings have different semantics from ordinary arrays.
|
||||
ArrayKind m_arrayKind = ArrayKind::Ordinary;
|
||||
TypePointer m_baseType;
|
||||
|
||||
Reference in New Issue
Block a user