aboutsummaryrefslogtreecommitdiffstats
path: root/LValue.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-04-15 23:40:50 +0800
committerchriseth <c@ethdev.com>2015-04-15 23:40:50 +0800
commit0c69d5fdcd3286f47c81dbcbcfb8802861eab8b5 (patch)
treef78c665e6084300b939cc4cfcebb97d3bd44d9f5 /LValue.cpp
parent158795e48f4285d713b11f78cdd04de8c6d1f667 (diff)
downloaddexon-solidity-0c69d5fdcd3286f47c81dbcbcfb8802861eab8b5.tar.gz
dexon-solidity-0c69d5fdcd3286f47c81dbcbcfb8802861eab8b5.tar.zst
dexon-solidity-0c69d5fdcd3286f47c81dbcbcfb8802861eab8b5.zip
Fixed function overloads.
Added tests, disallowed non-calling usage of non-unique function references.
Diffstat (limited to 'LValue.cpp')
-rw-r--r--LValue.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/LValue.cpp b/LValue.cpp
index 234072bc..fc990b0a 100644
--- a/LValue.cpp
+++ b/LValue.cpp
@@ -177,10 +177,10 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc
for (auto const& member: structType.getMembers())
{
// assign each member that is not a mapping
- TypePointer const& memberType = member.second;
+ TypePointer const& memberType = member.type;
if (memberType->getCategory() == Type::Category::Mapping)
continue;
- pair<u256, unsigned> const& offsets = structType.getStorageOffsetsOfMember(member.first);
+ pair<u256, unsigned> const& offsets = structType.getStorageOffsetsOfMember(member.name);
m_context
<< offsets.first << u256(offsets.second)
<< eth::Instruction::DUP6 << eth::Instruction::DUP3
@@ -230,10 +230,10 @@ void StorageItem::setToZero(SourceLocation const&, bool _removeReference) const
for (auto const& member: structType.getMembers())
{
// zero each member that is not a mapping
- TypePointer const& memberType = member.second;
+ TypePointer const& memberType = member.type;
if (memberType->getCategory() == Type::Category::Mapping)
continue;
- pair<u256, unsigned> const& offsets = structType.getStorageOffsetsOfMember(member.first);
+ pair<u256, unsigned> const& offsets = structType.getStorageOffsetsOfMember(member.name);
m_context
<< offsets.first << eth::Instruction::DUP3 << eth::Instruction::ADD
<< u256(offsets.second);