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
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
contract Contract {
uint256 var_amount;
function direct_returns(uint256 amount) internal returns (uint256) {
uint256 _amount = var_amount + amount;
return _amount;
}
function indirect_returns(uint256 amount)
internal
returns (uint256 _amount)
{
_amount = var_amount + amount;
}
function test() external {
uint256 a = direct_returns(10);
uint256 b = indirect_returns(10);
}
}
test.py:
direct_returns_function:Function
indirect_returns_function:Function
test_function:Function
a_variable:Variable
b_variable:Variable
#contract is test.sol:Contract
for function in contract.functions:
if function.name=="direct_returns":
direct_returns_function = function
elif function.name=="indirect_returns":
indirect_returns_function = function
elif function.name=="test":
test_function = function
for vari in test_function.variables_as_dict.values():
if vari.name=="a":
a_variable = vari
elif vari.name=="b":
b_variable = vari
print([vari.name for vari in get_dependencies(a_variable,contract)])
print([vari.name for vari in get_dependencies(b_variable,contract)])
Describe the issue:
test.sol:
test.py:
get result:
I was expecting the same result (same result length), but here it is different
Code example to reproduce the issue:
``
Version:
0.9.1
Relevant log output:
No response
The text was updated successfully, but these errors were encountered: