aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go
diff options
context:
space:
mode:
Diffstat (limited to 'gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go')
-rw-r--r--gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go
new file mode 100644
index 000000000..605c5ec2e
--- /dev/null
+++ b/gopls/internal/lsp/testdata/extract/extract_function/extract_return_complex.go
@@ -0,0 +1,17 @@
+package extract
+
+import "fmt"
+
+func _() (int, string, error) {
+ x := 1
+ y := "hello"
+ z := "bye" //@mark(exSt3, "z")
+ if y == z {
+ return x, y, fmt.Errorf("same")
+ } else {
+ z = "hi"
+ return x, z, nil
+ } //@mark(exEn3, "}")
+ return x, z, nil
+ //@extractfunc(exSt3, exEn3)
+}