You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
0xalpharush
changed the title
[Bug-Candidate]: Generated string of ir of assignment operation
[Bug]: Generated string of ir of assignment operation
Jan 3, 2024
Describe the issue:
If the rvalue of the assignment operation is Function object the 'str' method doesn't work correctly.
In this example, the call of
str(ir)
where their
is the object representing the assignment operation in functionassignFunction
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
The text was updated successfully, but these errors were encountered: