mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2491 from ethereum/warnAboutCallcode
Warn about callcode.
This commit is contained in:
@@ -123,6 +123,14 @@ bool StaticAnalyzer::visit(MemberAccess const& _memberAccess)
|
||||
"\"msg.value\" used in non-payable function. Do you want to add the \"payable\" modifier to this function?"
|
||||
);
|
||||
|
||||
if (_memberAccess.memberName() == "callcode")
|
||||
if (auto const* type = dynamic_cast<FunctionType const*>(_memberAccess.annotation().type.get()))
|
||||
if (type->kind() == FunctionType::Kind::BareCallCode)
|
||||
m_errorReporter.warning(
|
||||
_memberAccess.location(),
|
||||
"\"callcode\" has been deprecated in favour of \"delegatecall\"."
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user