In the following example, both the state refinement and the parameter refinement are individually valid, but when used together, the type checker returns the error Variable 'this' not found, which is probably a side effect of this bug.
@StateRefinement(from="downloading(this)", to="progress(this) == percentage")
public void updateProgress(@Refinement("percentage > progress(this)") int percentage) {} // Variable 'this' not found
By putting all the logic in the @StateRefinement, it works:
@StateRefinement(from="downloading(this) && percentage > progress(this)", to="progress(this) == percentage")
public void updateProgress(int percentage) {} // no error
By removing either one of them, we also don't get an error:
public void updateProgress(@Refinement("percentage > progress(this)") int percentage) {} // no error
// or
@StateRefinement(from="downloading(this)", to="progress(this) == percentage")
public void updateProgress(int percentage) {} // no error
There seems to be some kind of conflict between the two.
In the following example, both the state refinement and the parameter refinement are individually valid, but when used together, the type checker returns the error
Variable 'this' not found, which is probably a side effect of this bug.By putting all the logic in the
@StateRefinement, it works:By removing either one of them, we also don't get an error:
There seems to be some kind of conflict between the two.