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
@@ -273,7 +273,7 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc
|
||||
"Struct assignment with conversion."
|
||||
);
|
||||
solAssert(sourceType.location() != DataLocation::CallData, "Structs in calldata not supported.");
|
||||
for (auto const& member: structType.members())
|
||||
for (auto const& member: structType.members(nullptr))
|
||||
{
|
||||
// assign each member that is not a mapping
|
||||
TypePointer const& memberType = member.type;
|
||||
@@ -336,7 +336,7 @@ void StorageItem::setToZero(SourceLocation const&, bool _removeReference) const
|
||||
// @todo this can be improved: use StorageItem for non-value types, and just store 0 in
|
||||
// all slots that contain value types later.
|
||||
auto const& structType = dynamic_cast<StructType const&>(*m_dataType);
|
||||
for (auto const& member: structType.members())
|
||||
for (auto const& member: structType.members(nullptr))
|
||||
{
|
||||
// zero each member that is not a mapping
|
||||
TypePointer const& memberType = member.type;
|
||||
|
||||
Reference in new issue
Block a user