-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/golang: hover support return statements
Hovering over a return statement now reveals the result type of the function. Updates golang/go#70462 Change-Id: Ib15c0b3db52311762f021a514c0db7bd71411eb3 Reviewed-on: https://go-review.googlesource.com/c/tools/+/637476 Reviewed-by: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]>
- Loading branch information
1 parent
851152f
commit 8194029
Showing
3 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
This test checks that hovering over a return statement reveals the result type. | ||
|
||
-- a.go -- | ||
package a | ||
|
||
func one() int { | ||
return 1 //@hover("return", "return 1", "returns (int)") | ||
} | ||
|
||
func two() (int, int) { | ||
return 1, 2 //@hover("return", "return 1, 2", "returns (int, int)") | ||
} |