diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-08-10 22:15:39 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-08-13 22:33:37 +0800 |
commit | 4ae59acc098c2ede9a2dc44e741a28df49cc59d2 (patch) | |
tree | 74948179e523a1b1697cc3844b80e9713db6b722 /libsolidity | |
parent | a9f31da41146221c674356d5678030616110d471 (diff) | |
download | dexon-solidity-4ae59acc098c2ede9a2dc44e741a28df49cc59d2.tar.gz dexon-solidity-4ae59acc098c2ede9a2dc44e741a28df49cc59d2.tar.zst dexon-solidity-4ae59acc098c2ede9a2dc44e741a28df49cc59d2.zip |
Consider mappings return values in control flow analysis.
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/analysis/ControlFlowAnalyzer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/analysis/ControlFlowAnalyzer.cpp b/libsolidity/analysis/ControlFlowAnalyzer.cpp index 483d08c8..ab6569be 100644 --- a/libsolidity/analysis/ControlFlowAnalyzer.cpp +++ b/libsolidity/analysis/ControlFlowAnalyzer.cpp @@ -75,7 +75,10 @@ void ControlFlowAnalyzer::checkUnassignedStorageReturnValues( { auto& unassignedAtFunctionEntry = unassigned[_functionEntry]; for (auto const& returnParameter: _function.returnParameterList()->parameters()) - if (returnParameter->type()->dataStoredIn(DataLocation::Storage)) + if ( + returnParameter->type()->dataStoredIn(DataLocation::Storage) || + returnParameter->type()->category() == Type::Category::Mapping + ) unassignedAtFunctionEntry.insert(returnParameter.get()); } |