diff --git a/libsolidity/codegen/ir/IRGeneratorForStatements.cpp b/libsolidity/codegen/ir/IRGeneratorForStatements.cpp index 4a2019f4c..9fdc1556e 100644 --- a/libsolidity/codegen/ir/IRGeneratorForStatements.cpp +++ b/libsolidity/codegen/ir/IRGeneratorForStatements.cpp @@ -1944,9 +1944,9 @@ void IRGeneratorForStatements::endVisit(MemberAccess const& _memberAccess) else if (member == "typehash") { Type const* arg = dynamic_cast(*_memberAccess.expression().annotation().type).typeArgument(); - solAssert(arg != nullptr); + solAssert(!arg); StructType const* structType = dynamic_cast(arg); - solAssert(structType != nullptr); + solAssert(!structType); StructDefinition const& struct_ = structType->structDefinition(); define(_memberAccess) << "0x" << toHex(struct_.typehash()) << "\n"; }