Skip to content

Commit

Permalink
Make implict this explicit to avoid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bobismijnnaam committed Sep 25, 2024
1 parent 648ee61 commit 5e9b642
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/concepts/generics/genericChannel.pvl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ class Chan<T> {
context committed(this);
T noop(T t) {
writeValue(t);
return readValue();
/* Bug: removing this on the next line causes a crash. This is because the resolution system only resolves the
method that is referred to here, and not the implicit but omitted `this.` prefix. To fix this, this `this.`
should also be computed at resolution time, such that the return type of the expression `readValue()` can
be computed. See also: https://github.com/utwente-fmt/vercors/issues/1247
*/
return this.readValue();
}
}

Expand Down

0 comments on commit 5e9b642

Please sign in to comment.