Debian Codegraph @

gopls/internal/test/marker/testdata/references/issue67978.txt

raw
1
2 This test exercises a references query on an exported method that
3 conflicts with a field name. This ill-typed input violates the
4 assumption that if type T has a method, then the method set of T is
5 nonempty, which led to a crash.
6
7 See https://github.com/golang/go/issues/67978.
8
9 -- a.go --
10 package p
11
12 type E struct { X int } //@ diag(re"()X", re"field.*same name")
13
14 func (E) X() {} //@ loc(a, "X"), refs("X", a, b), diag(re"()X", re"method.*same name")
15
16 var _ = new(E).X //@ loc(b, "X")
17
18