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]: Generated string of ir of assignment operation #2266

Open
hovhannes-96 opened this issue Dec 20, 2023 · 1 comment
Open

[Bug]: Generated string of ir of assignment operation #2266

hovhannes-96 opened this issue Dec 20, 2023 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@hovhannes-96
Copy link

Describe the issue:

If the rvalue of the assignment operation is Function object the 'str' method doesn't work correctly.

pragma solidity ^0.8.7;

contract A {
    function add(uint256 a, uint256 b) public returns (uint256) {
        return a + b;
    }
}

contract B is A {
    function assignFunction() public {
        function(uint256, uint256) returns (uint256) myFunction = super.add;
    }
}

In this example, the call of str(ir) where the ir is the object representing the assignment operation in function assignFunction returns the following
"myFunction(function(uint256,uint256) returns(uint256)) := add([<slither.core.solidity_types.elementary_type.ElementaryType object at 0x7fee17c94070>])"

Code example to reproduce the issue:

slither --print slithir source.sol

Version:

0.10.0

Relevant log output:

No response

@hovhannes-96 hovhannes-96 added the bug-candidate Bugs reports that are not yet confirmed label Dec 20, 2023
@0xalpharush 0xalpharush added bug Something isn't working good first issue Good for newcomers and removed bug-candidate Bugs reports that are not yet confirmed labels Jan 3, 2024
@0xalpharush 0xalpharush changed the title [Bug-Candidate]: Generated string of ir of assignment operation [Bug]: Generated string of ir of assignment operation Jan 3, 2024
@paritoshkumar169
Copy link

hi, can i work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants