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
The pre-declaration usage of local variables detector checks a property which is impossible to violate since Solidity 0.5, see the last point of the 0.5 changelog. The exploit scenario example doesn't even compile with Solidity >=0.5. Any variable-scopes found when using Solidity >=0.5 are obviously false positives and unfortunately the detector does that quite often. All it takes is a function with the same variable name used twice in two separate scopes, e.g.
function foo() public {
{
uint a =0;
}
{
uint a =1;
}
}
It'd be great if this detector was disabled altogether when analyzing codebases using Solidity >=0.5.
The text was updated successfully, but these errors were encountered:
Describe the desired feature
The pre-declaration usage of local variables detector checks a property which is impossible to violate since Solidity 0.5, see the last point of the 0.5 changelog. The exploit scenario example doesn't even compile with Solidity >=0.5. Any
variable-scope
s found when using Solidity >=0.5 are obviously false positives and unfortunately the detector does that quite often. All it takes is a function with the same variable name used twice in two separate scopes, e.g.It'd be great if this detector was disabled altogether when analyzing codebases using Solidity >=0.5.
The text was updated successfully, but these errors were encountered: