Merge pull request #6603 from ethereum/abi-function-assertion-fix

Removes assert on magic ABI functions in code generation
This commit is contained in:
chriseth 2019-04-29 10:15:47 +02:00 committed by GitHub
commit 1eeca84cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -1401,6 +1401,10 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
m_context << Instruction::DUP1 << u256(32) << Instruction::ADD;
utils().storeStringData(contract.name());
}
else if (member == "encode" || member == "decode")
{
// no-op
}
else
solAssert(false, "Unknown magic member.");
break;

View File

@ -0,0 +1,8 @@
contract C {
function f() public pure {
abi.encode;
abi.decode;
}
}
// ----
// f() ->