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
When a function is declared by and called within the base class and overridden by the derived class, slither generates an error on the derived class saying that the function could be made external because the derived class doesn't call the function internally. However, the internal linkage is being used by the base class, and Solidity doesn't allow a derived class to change the visibility of a function when overriding it. Feel free to close if you think this detector is working as intended. I've built a minimal example that shows the false positive.
/*
Test
*/
pragma solidity ^0.5.0;
contract Base {
// Meant to be customized/overridden by derived classes.
function abstractFunction() public;
function callAbstract() external {
abstractFunction();
}
}
contract Derived is Base {
function abstractFunction() public {
// Some custom functionality.
}
}
The text was updated successfully, but these errors were encountered:
When a function is declared by and called within the base class and overridden by the derived class, slither generates an error on the derived class saying that the function could be made external because the derived class doesn't call the function internally. However, the internal linkage is being used by the base class, and Solidity doesn't allow a derived class to change the visibility of a function when overriding it. Feel free to close if you think this detector is working as intended. I've built a minimal example that shows the false positive.
The text was updated successfully, but these errors were encountered: