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