aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-21 18:07:40 +0800
committerchriseth <chris@ethereum.org>2018-02-26 18:17:40 +0800
commit4da20bdf012d948a45cc99d137cf18ead65c0a30 (patch)
tree372ce26d91cc78fbd087f80816b0608326a9a3e1 /libsolidity/ast
parent8ae6a76c58c7c35f429379fb67ccdfb457fc8e91 (diff)
downloaddexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.tar
dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.tar.gz
dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.tar.bz2
dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.tar.lz
dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.tar.xz
dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.tar.zst
dexon-solidity-4da20bdf012d948a45cc99d137cf18ead65c0a30.zip
Fix: Function types for getters should not have storage pointers.
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp5
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);
}
}