aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-13 22:42:58 +0800
committerchriseth <chris@ethereum.org>2017-06-14 20:26:20 +0800
commit07cc84fadee7f1f86467a8dba435b2d5b28db268 (patch)
tree2648b4405d12f9d5f8d53f92a15b4d05ae81752c /libsolidity
parentd3f4c97c533b2f64dda9fe7bdf5848f6c8bbb300 (diff)
downloaddexon-solidity-07cc84fadee7f1f86467a8dba435b2d5b28db268.tar
dexon-solidity-07cc84fadee7f1f86467a8dba435b2d5b28db268.tar.gz
dexon-solidity-07cc84fadee7f1f86467a8dba435b2d5b28db268.tar.bz2
dexon-solidity-07cc84fadee7f1f86467a8dba435b2d5b28db268.tar.lz
dexon-solidity-07cc84fadee7f1f86467a8dba435b2d5b28db268.tar.xz
dexon-solidity-07cc84fadee7f1f86467a8dba435b2d5b28db268.tar.zst
dexon-solidity-07cc84fadee7f1f86467a8dba435b2d5b28db268.zip
Fix a crash about a non-callable expression.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index b1911ef0..50482b8f 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -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)
{