mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rename Location::Default to Location::Unspecified.
This commit is contained in:
@@ -332,7 +332,7 @@ void ReferencesResolver::endVisit(VariableDeclaration const& _variable)
|
||||
case Location::Memory: return "\"memory\"";
|
||||
case Location::Storage: return "\"storage\"";
|
||||
case Location::CallData: return "\"calldata\"";
|
||||
case Location::Default: return "none";
|
||||
case Location::Unspecified: return "none";
|
||||
}
|
||||
return {};
|
||||
};
|
||||
@@ -368,12 +368,12 @@ void ReferencesResolver::endVisit(VariableDeclaration const& _variable)
|
||||
// Find correct data location.
|
||||
if (_variable.isEventParameter())
|
||||
{
|
||||
solAssert(varLoc == Location::Default, "");
|
||||
solAssert(varLoc == Location::Unspecified, "");
|
||||
typeLoc = DataLocation::Memory;
|
||||
}
|
||||
else if (_variable.isStateVariable())
|
||||
{
|
||||
solAssert(varLoc == Location::Default, "");
|
||||
solAssert(varLoc == Location::Unspecified, "");
|
||||
typeLoc = _variable.isConstant() ? DataLocation::Memory : DataLocation::Storage;
|
||||
}
|
||||
else if (
|
||||
@@ -394,7 +394,7 @@ void ReferencesResolver::endVisit(VariableDeclaration const& _variable)
|
||||
case Location::CallData:
|
||||
typeLoc = DataLocation::CallData;
|
||||
break;
|
||||
case Location::Default:
|
||||
case Location::Unspecified:
|
||||
solAssert(!_variable.hasReferenceOrMappingType(), "Data location not properly set.");
|
||||
}
|
||||
|
||||
|
||||
@@ -1217,7 +1217,7 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement)
|
||||
if (ref->dataStoredIn(DataLocation::Storage))
|
||||
{
|
||||
string errorText{"Uninitialized storage pointer."};
|
||||
if (varDecl.referenceLocation() == VariableDeclaration::Location::Default)
|
||||
if (varDecl.referenceLocation() == VariableDeclaration::Location::Unspecified)
|
||||
errorText += " Did you mean '<type> memory " + varDecl.name() + "'?";
|
||||
solAssert(m_scope, "");
|
||||
m_errorReporter.declarationError(varDecl.location(), errorText);
|
||||
|
||||
Reference in New Issue
Block a user