mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make members context-sensitive.
This commit is contained in:
1 parent
c498dcce22
commit
86495dfc57
14 files changed
+71
-79
No files matched your search
@@ -542,7 +542,7 @@ void CompilerUtils::convertType(Type const& _typeOnStack, Type const& _targetTyp
|
||||
allocateMemory();
|
||||
m_context << eth::Instruction::SWAP1 << eth::Instruction::DUP2;
|
||||
// stack: <memory ptr> <source ref> <memory ptr>
|
||||
for (auto const& member: typeOnStack.members())
|
||||
for (auto const& member: typeOnStack.members(nullptr))
|
||||
{
|
||||
if (!member.type->canLiveOutsideStorage())
|
||||
continue;
|
||||
@@ -642,7 +642,7 @@ void CompilerUtils::pushZeroValue(Type const& _type)
|
||||
m_context << eth::Instruction::DUP1;
|
||||
|
||||
if (auto structType = dynamic_cast<StructType const*>(&_type))
|
||||
for (auto const& member: structType->members())
|
||||
for (auto const& member: structType->members(nullptr))
|
||||
{
|
||||
pushZeroValue(*member.type);
|
||||
storeInMemoryDynamic(*member.type);
|
||||
|
||||
Reference in new issue
Block a user