Closed Leosimetti closed 2 years ago
This PR contains the following changes:
The proper way to change the state in the subclass b would be:
b
[] > a memory > state [self new_state] > update_state seq > @ state.write new_state state [] > b a > @ [self new_state] > change_state_plus_two new_state.add 2 > tmp seq > @ self.update_state self tmp state
An improper way to achieve the same functionality in subclass bad:
bad
[] > a memory > state [self new_state] > update_state seq > @ self.state.write new_state self.state [] > bad a > @ [self new_state] > change_state_plus_two seq > @ self.state.write (new_state.add 2) self.state
More detailed information about the problem statement and implementation is available here.
Please, add example(s) with explanation to the description of the PR.
This PR contains the following changes:
Example of the defect
The proper way to change the state in the subclass
b
would be:An improper way to achieve the same functionality in subclass
bad
:More detailed information about the problem statement and implementation is available here.