mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fixed code example (#2955)
This commit is contained in:
parent
4d01d0865e
commit
c6c3163c2a
@ -432,12 +432,12 @@ What happens to a ``struct``'s mapping when copying over a ``struct``?
|
||||
This is a very interesting question. Suppose that we have a contract field set up like such::
|
||||
|
||||
struct user {
|
||||
mapping(string => address) usedContracts;
|
||||
mapping(string => string) comments;
|
||||
}
|
||||
|
||||
function somefunction {
|
||||
user user1;
|
||||
user1.usedContracts["Hello"] = "World";
|
||||
user1.comments["Hello"] = "World";
|
||||
user user2 = user1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user