pragma solidity ^0.4.18;
contract Thing {
uint private quality;
address public owner;
function changeOwner(address newOwner) public {
owner = newOwner;
}
function makeBetter() public {
quality++;
}
function makeWorse() public{
quality--;
}
}
Current output:
type changeOwner_args is record
newOwner : address;
end;
type makeBetter_args is unit;
type makeWorse_args is unit;
type state is record
quality : nat;
owner : address;
end;
type router_enum is
| ChangeOwner of changeOwner_args
| MakeBetter of makeBetter_args
| MakeWorse of makeWorse_args;
function changeOwner (const self : state; const newOwner : address) : (state) is
block {
self.owner := newOwner;
} with (self);
function makeBetter (const self : state) : (unit) is
block {
self.quality := self.quality + 1n;
} with (unit);
function makeWorse (const self : state) : (unit) is
block {
self.quality := abs(self.quality - 1n);
} with (unit);
function main (const action : router_enum; const self : state) : (list(operation) * state) is
(case action of
| ChangeOwner(match_action) -> ((nil: list(operation)), changeOwner(self, match_action.newOwner))
| MakeBetter(match_action) -> block {
(* This function does nothing, but it's present in router *)
const tmp : unit = makeBetter(self);
} with (((nil: list(operation)), self))
| MakeWorse(match_action) -> block {
(* This function does nothing, but it's present in router *)
const tmp : unit = makeWorse(self);
} with (((nil: list(operation)), self))
end);
Problems with output:
makeBetter, makeWorse do not return state
router also does not return state
problem is in deep_check_storage_and_oplist_use
Input:
Current output:
Problems with output: