Merge pull request #3364 from ethereum/revertWithReason

Revert with reason
This commit is contained in:
chriseth
2018-04-12 21:01:08 +02:00
committed by GitHub
27 changed files with 487 additions and 82 deletions
+3 -4
View File
@@ -2146,10 +2146,9 @@ bool TypeChecker::visit(Identifier const& _identifier)
for (Declaration const* declaration: annotation.overloadedDeclarations)
{
TypePointer function = declaration->type();
solAssert(!!function, "Requested type not present.");
auto const* functionType = dynamic_cast<FunctionType const*>(function.get());
if (functionType && functionType->canTakeArguments(*annotation.argumentTypes))
FunctionTypePointer functionType = declaration->functionType(true);
solAssert(!!functionType, "Requested type not present.");
if (functionType->canTakeArguments(*annotation.argumentTypes))
candidates.push_back(declaration);
}
if (candidates.empty())