Unhelpful error message about reads clause #5262
Labels
kind: enhancement
Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny
part: documentation
Dafny's reference manual, tutorial, and other materials
Dafny version
latest-nightly
Code to produce this issue
Command to run and resulting output
What happened?
I did not get it why it could not read the array "entries" since it's in a method.
It turns out, "entries" is a shortcut for "this.entries", which means that this expression requires "reads this".
I think I would have immediately spotted it if, instead of the error message:
I would have had the following error message, at least because "this" is implicit.
What type of operating system are you experiencing the problem on?
Windows
The text was updated successfully, but these errors were encountered: