mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update libsolidity/codegen/ExpressionCompiler.cpp
Co-authored-by: Hari <webmail.hari@gmail.com>
This commit is contained in:
parent
422676aef2
commit
f9b9905c95
@ -1934,6 +1934,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
|
|||||||
else if (member == "typehash")
|
else if (member == "typehash")
|
||||||
{
|
{
|
||||||
Type const* arg = dynamic_cast<MagicType const&>(*_memberAccess.expression().annotation().type).typeArgument();
|
Type const* arg = dynamic_cast<MagicType const&>(*_memberAccess.expression().annotation().type).typeArgument();
|
||||||
|
solAssert(dynamic_cast<StructType const*>(arg), "typehash called on a non-struct type")
|
||||||
StructDefinition const& struct_ = dynamic_cast<StructType const&>(*arg).structDefinition();
|
StructDefinition const& struct_ = dynamic_cast<StructType const&>(*arg).structDefinition();
|
||||||
m_context << struct_.typehash();
|
m_context << struct_.typehash();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user