Use StaticAnalyzer to deprecate msg.gas instead of conditionally removing it in MagicType.

This commit is contained in:
Daniel Kirchner
2018-03-05 23:16:26 +01:00
parent 2213f9946b
commit 91b13b734d
4 changed files with 24 additions and 18 deletions
@@ -924,8 +924,6 @@ bool ExpressionCompiler::visit(NewExpression const&)
bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
{
bool const v050 = m_context.experimentalFeatureActive(ExperimentalFeature::V050);
CompilerContext::LocationSetter locationSetter(m_context, _memberAccess);
// Check whether the member is a bound function.
ASTString const& member = _memberAccess.memberName();
@@ -1141,10 +1139,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
else if (member == "origin")
m_context << Instruction::ORIGIN;
else if (member == "gas")
{
solAssert(!v050, "");
m_context << Instruction::GAS;
}
else if (member == "gasprice")
m_context << Instruction::GASPRICE;
else if (member == "data")