-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outlining treats returns
like requires
#67
Comments
I've quickly checked the behavior of this feature. Just for clarification, if anyone else reads this, the collapsing of code blocks is not related to the language server feature introduced by dafny-lang/dafny#1483. For example, if the out-parameters are declared on the same level as the method signature, the arrow is displayed at the line of the An alternative would be leaving the out parameters on the same line as the The language server may provide the folding ranges. However, I guess this needs some (extensive) user testing on how practicable it is compared to the current behavior. The symbol table can only be reliably computed if the document can be resolved. If it fails to resolve due to syntax/resolution errors, the language server relocates the symbols from the last successful resolution based on the user edits. Edit: I've experimented a little bit with the folding ranges. I've placed the folding right on the line of the last out-parameter: |
The document-outline feature allows a method to be collapsed in various places, for example, its signature, specification, and body. However, the
returns
keyword and the out-parameters that follow ought to be treated the same way as the in-parameters, not the same way as the specification clauses.For example, consider this method:
It offers two places to collapse the code. By clicking the
>
by the method, not only are the specification clauses collapsed (that's fine), but so is thereturns
keyword and the out-parameters, as illustrated here:I think it would be preferable to still show the out-parameters.
That is, the behavior to strive for is to treat out-parameters like in-parameters --- either show all of them or show none of them, but don't hide just the out-parameters.
The text was updated successfully, but these errors were encountered: