diff options
Diffstat (limited to 'gopls/internal/lsp/testdata/selectionrange/foo.go')
-rw-r--r-- | gopls/internal/lsp/testdata/selectionrange/foo.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/selectionrange/foo.go b/gopls/internal/lsp/testdata/selectionrange/foo.go new file mode 100644 index 000000000..1bf41340c --- /dev/null +++ b/gopls/internal/lsp/testdata/selectionrange/foo.go @@ -0,0 +1,13 @@ +package foo + +import "time" + +func Bar(x, y int, t time.Time) int { + zs := []int{1, 2, 3} //@selectionrange("1") + + for _, z := range zs { + x = x + z + y + zs[1] //@selectionrange("1") + } + + return x + y //@selectionrange("+") +} |