Issue warning for using CREATE2 in inline assembly

This commit is contained in:
Alex Beregszaszi 2017-06-13 20:00:13 +01:00 committed by chriseth
parent bec30051c5
commit 494b9dbfaa

View File

@ -449,12 +449,13 @@ void AsmAnalyzer::warnOnFutureInstruction(solidity::Instruction _instr, SourceLo
{ {
switch (_instr) switch (_instr)
{ {
case solidity::Instruction::CREATE2:
case solidity::Instruction::RETURNDATASIZE: case solidity::Instruction::RETURNDATASIZE:
case solidity::Instruction::RETURNDATACOPY: case solidity::Instruction::RETURNDATACOPY:
m_errorReporter.warning( m_errorReporter.warning(
_location, _location,
"The RETURNDATASIZE/RETURNDATACOPY instructions are only available after " "The \"" + _instr + "\" instruction is only available after " +
"the Metropolis hard fork. Before that they act as an invalid instruction." "the Metropolis hard fork. Before that it acts as an invalid instruction."
); );
break; break;
default: default: