diff options
author | chriseth <chris@ethereum.org> | 2018-02-21 18:07:40 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-02-26 18:17:40 +0800 |
commit | 4da20bdf012d948a45cc99d137cf18ead65c0a30 (patch) | |
tree | 372ce26d91cc78fbd087f80816b0608326a9a3e1 | |
parent | 8ae6a76c58c7c35f429379fb67ccdfb457fc8e91 (diff) | |
download | dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.tar.gz dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.tar.zst dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.zip |
Fix: Function types for getters should not have storage pointers.
-rw-r--r-- | libsolidity/ast/Types.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index a7d3e256..41f95f30 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -2206,7 +2206,10 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl): if (auto arrayType = dynamic_cast<ArrayType const*>(member.type.get())) if (!arrayType->isByteArray()) continue; - m_returnParameterTypes.push_back(member.type); + m_returnParameterTypes.push_back(ReferenceType::copyForLocationIfReference( + DataLocation::Memory, + member.type + )); m_returnParameterNames.push_back(member.name); } } |