Skip to content
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

Cannot disambiguate functions - Inheritance/ContractType #45

Closed
plotchy opened this issue May 16, 2023 · 0 comments · Fixed by #43
Closed

Cannot disambiguate functions - Inheritance/ContractType #45

plotchy opened this issue May 16, 2023 · 0 comments · Fixed by #43

Comments

@plotchy
Copy link
Collaborator

plotchy commented May 16, 2023

abstract contract YInterface {
    function foo() virtual external returns (uint);
}

contract Y is YInterface {
    function foo() virtual override public returns (uint) {
        return 1;
    }

    function bar(Y y) internal {
        y.foo();
    }
}
image

On the other hand, this is ok:

contract Y {
    function foo() virtual public returns (uint) {
        return 1;
    }

    function bar(Y y) internal {
        y.foo();
    }
}

Thinking extra layer with the virtual fn in the inherited interface matters.

@brockelmore brockelmore linked a pull request May 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant