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

Calls to virtual internal fn remain Unresolved, break assignments afterwards #38

Closed
plotchy opened this issue May 15, 2023 · 1 comment · Fixed by #32
Closed

Calls to virtual internal fn remain Unresolved, break assignments afterwards #38

plotchy opened this issue May 15, 2023 · 1 comment · Fixed by #32

Comments

@plotchy
Copy link
Collaborator

plotchy commented May 15, 2023

Calling an un-init virtual function is valid within abstract contracts, we should handle it other than Unresolved

abstract contract A {
    uint a;
    function foo(uint b) internal {
        if (bar() > 1) {}
        a = b;
    }

    function bar() virtual internal view returns (uint);
}
image
@plotchy
Copy link
Collaborator Author

plotchy commented May 15, 2023

Seems to mess with logic that uses the input parameter value.

IE: this is ok

abstract contract A {
    uint a;
    function foo(uint b) internal {
        if (bar() > 1) {}
        a = 1; //notice difference
    }

    function bar() virtual internal view returns (uint);
}

@brockelmore brockelmore linked a pull request May 15, 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