Debian Codegraph @

gopls/internal/test/marker/testdata/codeaction/splitlines-variadic.txt

raw
1 This is a regression test for #70519, in which the ellipsis
2 of a variadic call would go missing after split/join lines.
3
4 -- go.mod --
5 module example.com
6 go 1.18
7
8 -- a/a.go --
9 package a
10
11 var a, b, c []any
12 func f(any, any, ...any)
13
14 func _() {
15 f(a, b, c...) //@codeaction("a", "refactor.rewrite.splitLines", result=split)
16
17 f(
18 a,
19 b,
20 c..., /*@codeaction("c", "refactor.rewrite.joinLines", result=joined)*/
21 )
22 }
23
24 -- @split/a/a.go --
25 package a
26
27 var a, b, c []any
28 func f(any, any, ...any)
29
30 func _() {
31 f(
32 a,
33 b,
34 c...,
35 ) //@codeaction("a", "refactor.rewrite.splitLines", result=split)
36
37 f(
38 a,
39 b,
40 c..., /*@codeaction("c", "refactor.rewrite.joinLines", result=joined)*/
41 )
42 }
43
44 -- @joined/a/a.go --
45 package a
46
47 var a, b, c []any
48 func f(any, any, ...any)
49
50 func _() {
51 f(a, b, c...) //@codeaction("a", "refactor.rewrite.splitLines", result=split)
52
53 f(a, b, c..., /*@codeaction("c", "refactor.rewrite.joinLines", result=joined)*/)
54 }
55