Remove warnings in examples#3295
Conversation
| } | ||
|
|
||
| function isTokenTransferOK( | ||
| address currentOwner, |
There was a problem hiding this comment.
Can you keep the currentOwner variable and just comment out its name?
There was a problem hiding this comment.
I put currentOwner back and updated the function isTokenTransferOK() to use it and avoid the unused variable warning.
|
Wonderful, thanks a lot for the many changes! I think you added a |
|
Good spot; the rogue |
|
@mcdee great work! Would it be possible to split this into two PRs?
The first one should be fairly simple, but it will also bump the version requirement to 0.4.16 (all the experimental pragmas in the affected sources must be changed). Apart from that this PR should be easy to review and merge. The second PR with the shadowing changes (renaming variables, function names, contract names) might take a bit more work and back and forth discussion. |
|
To clarify: |
|
@axic I've reverted the shadowing changes and bumped the Solidity version where appropriate. I'll create a new PR for the shadowing changes once this one is out of the way. |
|
Rebase should be done and newer code tweaked. BTW when I was looking at the merges it looks like https://github.com/ethereum/solidity/blob/develop/docs/abi-spec.rst#json is now incorrect. The displayed ABI does not include the definition for |
You are correct. I've noticed that last week, but then forgot to fix it before merging. Will fix it, unless you are interested pushing a change? |
|
My ABI contains a whole bunch of additional stuff (payable, stateMutability etc.) and I don't know if you're after any particular order in the JSON so I'll pass on pushing that one. |
|
Ok! Seems like you didn't do a rebase. It should be |
|
|
|
I think you have difficulties because you did not create a separate branch locally. The way to work this around for now is the following:
|
|
Did I mention how much Some git surgery later, this should now be a PR against current develop with the relevant changes. |
|
Please see the logs, there's at least one compilation failure: |
|
Apologies for the errors; should be passing now. |
|
Wonderful, thanks for your hard work, @mcdee ! |
Solidity has moved on since many of the examples in the documentation were written. This causes problems where users cut and paste the examples in to Remix and it spits out what they see as errors (generally warnings but very confusing for new users).
This PR fixes up the various code samples in the documentation so that they don't give spurious examples when pasted in to the current Remix.
Note that this does not update the Solidity version in the relevant pragmas; this could be done in a new PR if required.