mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
TypeChecker: Use cast instead of category() check
This commit is contained in:
parent
10a9960eb3
commit
223dac3eca
@ -2051,9 +2051,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
|
|||||||
errorMsg.pop_back();
|
errorMsg.pop_back();
|
||||||
errorMsg += " - did you forget the \"payable\" modifier?";
|
errorMsg += " - did you forget the \"payable\" modifier?";
|
||||||
}
|
}
|
||||||
else if (exprType->category() == Type::Category::Function)
|
else if (auto const& funType = dynamic_pointer_cast<FunctionType const>(exprType))
|
||||||
{
|
|
||||||
if (auto const& funType = dynamic_pointer_cast<FunctionType const>(exprType))
|
|
||||||
{
|
{
|
||||||
auto const& t = funType->returnParameterTypes();
|
auto const& t = funType->returnParameterTypes();
|
||||||
if (t.size() == 1)
|
if (t.size() == 1)
|
||||||
@ -2063,7 +2061,6 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
|
|||||||
)
|
)
|
||||||
errorMsg += " Did you intend to call the function?";
|
errorMsg += " Did you intend to call the function?";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (exprType->category() == Type::Category::Contract)
|
else if (exprType->category() == Type::Category::Contract)
|
||||||
{
|
{
|
||||||
for (auto const& addressMember: AddressType::addressPayable().nativeMembers(nullptr))
|
for (auto const& addressMember: AddressType::addressPayable().nativeMembers(nullptr))
|
||||||
|
Loading…
Reference in New Issue
Block a user