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 shadowing-function detector (used internally for the inheritance-graph printer) does not return correct results. It relies on checking that an inheriting contract has a function definition with the same full_name, but does this by using the functions property of a contract. The functions property returns functions from contracts inherited from as well. This causes this detector to return every function for any inherited contract as if it is being shadowed (which the printer later filters out, making it seem as if this detector is behaving as intended).
Example:
contract A {
function notShadowed() public {
}
}
contract B is A {
}
This contract will produce the following results from the detector:
The
shadowing-function
detector (used internally for theinheritance-graph
printer) does not return correct results. It relies on checking that an inheriting contract has a function definition with the samefull_name
, but does this by using thefunctions
property of a contract. Thefunctions
property returns functions from contracts inherited from as well. This causes this detector to return every function for any inherited contract as if it is being shadowed (which the printer later filters out, making it seem as if this detector is behaving as intended).Example:
This contract will produce the following results from the detector:
Obviously
notShadowed
is not shadowed and should not be returned as a result.Furthermore, this could be extended to include modifiers so that the printer can highlight shadowed modifiers as well.
The text was updated successfully, but these errors were encountered: