-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic getters not recognised in interface implementations #4847
Comments
This has another odd side-effect in code like the below, where it isn't possible to specify in an interface that there is a function
|
That's a good point. Actually, with the latest version you'll get an |
Yep - I think since automatic getters are part of the language specification (and reflected in ABIs) they should be considered a match for the interface (which is effectively an ABI as it maps 1-1 with ABIs). There are other oddities like my second comment above where it seems like if you're inheriting from a contract, the inheritance is done at the ABI level (so you can't redefine an existing function encoded as a public state variable) but if the public state variable is in the same contract, you're free to redefine its getter function. |
This may be a duplicate of #3514. |
Closing as duplicate although I though we already fixed that. sigh |
Description
In code like the below,
address public balance
has an automatic getter function (as can be seen in the corresponding ABI).However we need to redefine it to avoid the compiler complaining that
Test
does not fully implementITest
.Any idea if this is a bug or a feature (and if so why)?
The text was updated successfully, but these errors were encountered: