Remove unnecessary checks.

This commit is contained in:
chriseth
2021-02-11 13:08:03 +01:00
committed by hrkrshnn
parent 72c6932bf5
commit 45dc705683
2 changed files with 18 additions and 11 deletions
@@ -893,17 +893,7 @@ void IRGeneratorForStatements::endVisit(FunctionCall const& _functionCall)
return;
}
auto memberAccess = dynamic_cast<MemberAccess const*>(&_functionCall.expression());
if (memberAccess)
{
if (auto expressionType = dynamic_cast<TypeType const*>(memberAccess->expression().annotation().type))
{
solAssert(!functionType->bound(), "");
if (auto contractType = dynamic_cast<ContractType const*>(expressionType->actualType()))
if (contractType->contractDefinition().isLibrary())
solAssert(functionType->kind() == FunctionType::Kind::Internal || functionType->kind() == FunctionType::Kind::DelegateCall, "");
}
}
auto const* memberAccess = dynamic_cast<MemberAccess const*>(&_functionCall.expression());
switch (functionType->kind())
{