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

[Bug]: Reorder arguments does not work when overridden function uses different name parameters #2610

Open
smonicas opened this issue Dec 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@smonicas
Copy link
Contributor

smonicas commented Dec 3, 2024

When a virtual function is used in the base contract with named arguments while being overridden with different name parameters the reorder arguments function can't find the argument. I believe it's because the function assigned to the IR is the overridden one which has different name parameters.

pragma solidity 0.8.27;

contract A {
 function a(uint256 q) internal virtual {}
 function b() public { a({q: 23}); }
}

contract B is A {
 function a(uint256 w) internal override {}
}
...
  File "/Users/simonemonica/virtual/slither-dev/slither/slither/slithir/convert.py", line 431, in reorder_arguments
    ind = call_names.index(n)
          ^^^^^^^^^^^^^^^^^^^
ValueError: 'w' is not in list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant