mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Require storage location.
This commit is contained in:
parent
c438b73f68
commit
a1f54f4e40
@ -377,19 +377,10 @@ void ReferencesResolver::endVisit(VariableDeclaration const& _variable)
|
|||||||
{
|
{
|
||||||
typeLoc = DataLocation::Storage;
|
typeLoc = DataLocation::Storage;
|
||||||
if (_variable.isLocalVariable())
|
if (_variable.isLocalVariable())
|
||||||
{
|
typeError(
|
||||||
if (_variable.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050))
|
_variable.location(),
|
||||||
typeError(
|
"Data location must be specified as either \"memory\" or \"storage\"."
|
||||||
_variable.location(),
|
);
|
||||||
"Data location must be specified as either \"memory\" or \"storage\"."
|
|
||||||
);
|
|
||||||
else
|
|
||||||
m_errorReporter.warning(
|
|
||||||
_variable.location(),
|
|
||||||
"Variable is declared as a storage pointer. "
|
|
||||||
"Use an explicit \"storage\" keyword to silence this warning."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user