diff options
author | chriseth <chris@ethereum.org> | 2017-06-15 00:35:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-15 00:35:38 +0800 |
commit | f008ddf83646f6002a61a123cc94ad195a35dce4 (patch) | |
tree | 1473e56deb36d2ff77a412fc89c15dd6aec6b0f4 /libsolidity | |
parent | fd5bf16101d514d77cf4c7c64de367ec398995a2 (diff) | |
parent | 29e7ad3d7b2b1700c085348911b0d6f129d2a5a5 (diff) | |
download | dexon-solidity-f008ddf83646f6002a61a123cc94ad195a35dce4.tar dexon-solidity-f008ddf83646f6002a61a123cc94ad195a35dce4.tar.gz dexon-solidity-f008ddf83646f6002a61a123cc94ad195a35dce4.tar.bz2 dexon-solidity-f008ddf83646f6002a61a123cc94ad195a35dce4.tar.lz dexon-solidity-f008ddf83646f6002a61a123cc94ad195a35dce4.tar.xz dexon-solidity-f008ddf83646f6002a61a123cc94ad195a35dce4.tar.zst dexon-solidity-f008ddf83646f6002a61a123cc94ad195a35dce4.zip |
Merge pull request #2381 from ethereum/fixcrash
Fix a crash about a non-callable expression.
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index b1911ef0..2a8d1ff6 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) { |