-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
bug 🐛should compile without errorError is reported even though it shouldn't. Source is fine.Error is reported even though it shouldn't. Source is fine.
Description
Description
Trying to call super in a contract with multiple inheritance throws an InternalCompilerError with no message.
In my case, it appeared when overriding a function of a parent class and implemented interface and then calling super on that same function.
Environment
- Compiler version: 0.8.1 (also appears at least on 0.8.4 and 0.6.1)
- Target EVM version (as per compiler settings): istanbul
- Framework/IDE (e.g. Truffle or Remix): Both Truffle and Remix show this behaviour
- EVM execution environment / backend / blockchain client: n.a.
- Operating system: Win10
Steps to Reproduce
pragma solidity 0.8.1;
// SPDX-License-Identifier: MIT
contract A{
function x() public virtual {
}
}
interface I{
function x() external;
}
contract B is A, I{
function x() override(A, I) public {
super.x();
}
}Compiler error occurs when compiling above Source code.
Although using super in this case is definitely not best-practice, I think there should be error message which helps identify the source (searched for 4 hours myself).
Metadata
Metadata
Assignees
Labels
bug 🐛should compile without errorError is reported even though it shouldn't. Source is fine.Error is reported even though it shouldn't. Source is fine.