aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-30 22:37:08 +0800
committerchriseth <chris@ethereum.org>2017-06-30 22:37:32 +0800
commit044058276ea27b3d43622b28416ad4dc41091a31 (patch)
tree9117848d13230d9db2378fa2e9f659ce0d0942db /libsolidity
parent735c977db1824436d09d8e7a5c120fcab21003c3 (diff)
downloaddexon-solidity-044058276ea27b3d43622b28416ad4dc41091a31.tar
dexon-solidity-044058276ea27b3d43622b28416ad4dc41091a31.tar.gz
dexon-solidity-044058276ea27b3d43622b28416ad4dc41091a31.tar.bz2
dexon-solidity-044058276ea27b3d43622b28416ad4dc41091a31.tar.lz
dexon-solidity-044058276ea27b3d43622b28416ad4dc41091a31.tar.xz
dexon-solidity-044058276ea27b3d43622b28416ad4dc41091a31.tar.zst
dexon-solidity-044058276ea27b3d43622b28416ad4dc41091a31.zip
Warn about callcode.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/StaticAnalyzer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libsolidity/analysis/StaticAnalyzer.cpp b/libsolidity/analysis/StaticAnalyzer.cpp
index 375e9bde..b1b31163 100644
--- a/libsolidity/analysis/StaticAnalyzer.cpp
+++ b/libsolidity/analysis/StaticAnalyzer.cpp
@@ -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;
}