I have a really strange problem. When I deploy a contract in JavaScriptVM using Remix including the following function:
function setLoanStatus(address _loan, bytes1 _newStatus) public {
// "A" = 0x41 / "I" = 0x49 / "S" = 0x53
var check = (_newStatus == 0x41 || _newStatus == 0x49 || _newStatus == 0x53);
if (check)
{
// Only update status if it is a valid value
loanStatusList[_loan] = _newStatus;
} // if (check)
} // function setLoanStatus(address _loan, bytes1 _newStatus) public {
the contract appears to deploy, but if I try to look at any value I get the message:
error: Failed to decode output: TypeError: Cannot read property 'length' of undefined
If I change the visibility to internal it will deploy properly AND if I deploy the contract with original function in Injected Web3 it works properly. I am using the Ropsten testnet.
Any ideas why this behavior is happening?