Merge pull request #2381 from ethereum/fixcrash

Fix a crash about a non-callable expression.
This commit is contained in:
chriseth
2017-06-14 18:35:38 +02:00
committed by GitHub
3 changed files with 16 additions and 5 deletions
+1 -4
View File
@@ -1287,14 +1287,11 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
membersRemovedForStructConstructor = structType.membersMissingInMemory();
_functionCall.annotation().isPure = isPure;
}
else
{
functionType = dynamic_pointer_cast<FunctionType const>(expressionType);
else if ((functionType = dynamic_pointer_cast<FunctionType const>(expressionType)))
_functionCall.annotation().isPure =
isPure &&
_functionCall.expression().annotation().isPure &&
functionType->isPure();
}
if (!functionType)
{