Debian Codegraph @

gopls/internal/test/marker/testdata/completion/issue59096.txt

raw
1 This test exercises the panic in golang/go#59096: completing at a syntactic
2 type-assert expression was panicking because gopls was translating it into
3 a (malformed) selector expr.
4
5 -- go.mod --
6 module example.com
7
8 -- a/a.go --
9 package a
10
11 func _() {
12 b.(foo) //@complete(re"b.()", B), diag("b", re"(undefined|undeclared name): b")
13 }
14
15 //@item(B, "B", "const (from \"example.com/b\")", "const")
16
17 -- b/b.go --
18 package b
19
20 const B = 0