mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allow using calldata keyword to specify data location
This commit is contained in:
@@ -1469,12 +1469,20 @@ string ReferenceType::stringForReferencePart() const
|
||||
string ReferenceType::identifierLocationSuffix() const
|
||||
{
|
||||
string id;
|
||||
if (location() == DataLocation::Storage)
|
||||
switch (location())
|
||||
{
|
||||
case DataLocation::Storage:
|
||||
id += "_storage";
|
||||
else if (location() == DataLocation::Memory)
|
||||
break;
|
||||
case DataLocation::Memory:
|
||||
id += "_memory";
|
||||
else
|
||||
break;
|
||||
case DataLocation::CallData:
|
||||
id += "_calldata";
|
||||
break;
|
||||
default:
|
||||
solAssert(false, "Unknown location returned by location()");
|
||||
}
|
||||
if (isPointer())
|
||||
id += "_ptr";
|
||||
return id;
|
||||
|
||||
Reference in New Issue
Block a user