aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/Types.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-24 16:23:35 +0800
committerchriseth <c@ethdev.com>2015-09-24 16:23:35 +0800
commit52f7e3584350a3d204542ccc982c0951f4c94dc7 (patch)
treefb37a3e6d0694468ce25fe6fa3b0dfa7dc924f4f /libsolidity/Types.cpp
parent4a2114ba35eae0a9dae5be2526d107dd19d33baf (diff)
parent8a9b9e4fdbead915da0dd725d3dc0ffe45d84065 (diff)
downloaddexon-solidity-52f7e3584350a3d204542ccc982c0951f4c94dc7.tar.gz
dexon-solidity-52f7e3584350a3d204542ccc982c0951f4c94dc7.tar.zst
dexon-solidity-52f7e3584350a3d204542ccc982c0951f4c94dc7.zip
Merge pull request #91 from chriseth/literalStringsToStoragePointer
Literal strings to storage pointer
Diffstat (limited to 'libsolidity/Types.cpp')
-rw-r--r--libsolidity/Types.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/Types.cpp b/libsolidity/Types.cpp
index 18f2817e..0e24a813 100644
--- a/libsolidity/Types.cpp
+++ b/libsolidity/Types.cpp
@@ -511,7 +511,9 @@ bool StringLiteralType::isImplicitlyConvertibleTo(Type const& _convertTo) const
if (auto fixedBytes = dynamic_cast<FixedBytesType const*>(&_convertTo))
return size_t(fixedBytes->numBytes()) >= m_value.size();
else if (auto arrayType = dynamic_cast<ArrayType const*>(&_convertTo))
- return arrayType->isByteArray();
+ return
+ arrayType->isByteArray() &&
+ !(arrayType->dataStoredIn(DataLocation::Storage) && arrayType->isPointer());
else
return false;
}