I have a simple test contract:
pragma solidity ^0.4.8;
contract Test {
uint public myVal;
function callIt() {
this.call.gas(50000)(bytes4(sha3("setMyVal(uint256)")), 123);
}
function setMyVal(uint _newVal) internal {
myVal = _newVal;
}
}
I am testing the contract in remix. It seems that I cannot call the setMyVal from callIt if setMyVal is set to internal - why? I am still calling it from within the same contract. Is the signature in that case different from bytes4(sha3("setMyVal(uint256)"))?
FYI: All works well when removing the internal keyword. But I would like to not allow these functions to be called from the outside. In case it matters: I am looking at using this pattern similar to function pointers, similarly as discussed before.
