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
contractA {
function getValue() publicpurereturns (uint) {
return0;
}
}
contractBisA {
function getValue() publicpurereturns (uint) {
return0;
}
}
contractCisA {
function getValue() publicpurereturns (uint) {
returnsuper.getValue() ;
}
}
contractEisB, C {
}
In this example, slither will fail to understand that in the context of E, return super.getValue() ; is return B.getValue() ; (and in the context of C only, it is return A.getValue() ;
One solution is to create an instance of getValue in E, but that might break some existing code assumptions.
Another solution is to not translate super during the parsing, and to compute it only when needed.
The text was updated successfully, but these errors were encountered:
contract A{
function f1() public{
f2();
}
function f2() public{
}
}
contract B is A{
function f2() public{
super.f2();
}
}
f1() will incorrectly fix its internal call to A.f2, while it will be B.f2 in the B context. More I think about it, more I think we should delay the destination resolution of internal functions, and have a context-dependent resolver for it.
This can lead to incorrect results and must be fixed prior 0.7.0
In this example, slither will fail to understand that in the context of
E
,return super.getValue() ;
isreturn B.getValue() ;
(and in the context of C only, it isreturn A.getValue() ;
One solution is to create an instance of
getValue
inE
, but that might break some existing code assumptions.Another solution is to not translate
super
during the parsing, and to compute it only when needed.The text was updated successfully, but these errors were encountered: