-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Internal compiler error for call to unimplemented "super" function #5130
Comments
|
What do you mean by "rename a.f()"? Can you post the full changed contract that does compile, please? |
Sure - I meant that this compiles:
This just shows that there's apparently some significance to having an implementation of the function in the sub class for the error to occur. |
Great, thanks! |
@chriseth , would like to take up this issue. Let me know the strategy to proceed. I hope it is not too tricky. |
It might work to just ignore functions that do not have implementations in |
@chriseth, Did some analysis, let me know your thoughts
This code compiles after changing the contract as above. As per the issue we are trying to call base contract function (which is not implemented) in derived contract, hence the error. Error seems to be expected as per my understanding. Below code also compiles,
which basically says that if base contract function is implemented things work fine. So do we consider this (calling unimplemented base contract function) as valid? If so, then I can proceed with my analysis to fix this issue. |
The initial code should result in an error stating something like |
@chriseth, I have a solution ready, please help me to write test case so that I can push both changes at once. |
@anurag-git the initial code is a good test case. Put it in the |
If the contract a {
function f() public;
}
contract b is a {
function f() public { a.f(); }
} |
The issue in the latest comment is tracked in #7314 |
The following contract produces an internal compiler error in various solc versions, including the most recent build in Remix:
It does compile (but cannot be deployed due to the missing implementation) if I rename a.f().
(This report is part of an ICE Center@ETH Zurich project on automated compiler validation funded by the Ethereum Foundation.)
The text was updated successfully, but these errors were encountered: