Fix a crash about a non-callable expression.

This commit is contained in:
chriseth
2017-06-14 14:26:20 +02:00
parent d3f4c97c53
commit 07cc84fade
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)
{