Report error on shadowing state variables#7817
Merged
chriseth merged 1 commit intodevelop_060from Dec 3, 2019
Merged
Conversation
a8b780c to
afec573
Compare
chriseth
reviewed
Nov 27, 2019
Contributor
|
Please add changelog entry, documentation and entry to "0.6.0" change list" |
b34c7d3 to
08c9912
Compare
Marenz
reviewed
Nov 27, 2019
Contributor
|
I just found this https://github.com/ethereum/solidity/blob/develop/libsolidity/analysis/NameAndTypeResolver.cpp#L349 |
08c9912 to
fc1272a
Compare
fc1272a to
6cf4805
Compare
|
Rebased, updated docs, tests and comments |
Marenz
approved these changes
Dec 3, 2019
6cf4805 to
9403839
Compare
ekpyron
reviewed
Dec 3, 2019
ekpyron
requested changes
Dec 3, 2019
chriseth
reviewed
Dec 3, 2019
Contributor
|
Do we have a test that shows a clash between a variable and a function? |
9403839 to
9c5e6a1
Compare
9c5e6a1 to
7bbdfe0
Compare
chriseth
approved these changes
Dec 3, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal:
Notes
I still feel it kind of conflicts with the work with @Marenz. So maybe you can have a look too (that's why some tests (of yours) are failing).
Maybe we should clarify here a bit. I see perfect reasoning in the way shadowed variables are reported (in this PR), and I thought that the variable override logic were about to override a base function with a state var in the child contract, but apparently some tests fail with some interesting new syntax that I don't understand yet.