Debian Codegraph @

gopls/internal/test/marker/testdata/quickfix/stubmethods/issue61693.txt

raw
1 This test exercises stub methods functionality with variadic parameters.
2
3 In golang/go#61693 stubmethods was panicking in this case.
4
5 -- go.mod --
6 module mod.com
7
8 go 1.18
9 -- main.go --
10 package main
11
12 type C int
13
14 func F(err ...error) {}
15
16 func _() {
17 var x error
18 F(x, C(0)) //@quickfix(re"C.0.", re"missing method Error", stub)
19 }
20 -- @stub/main.go --
21 @@ -5 +5,5 @@
22 +// Error implements [error].
23 +func (c C) Error() string {
24 + panic("unimplemented")
25 +}
26 +