gotools/gopls/internal/test/marker/testdata/symbol/generic.txt

Basic tests of textDocument/documentSymbols with generics.

-- symbol.go --
//@symbol(want)

package main

type T[P any] struct {
	F P
}

type Constraint interface {
	~int | struct{ int }
	interface{ M() }
}

-- @want --
Constraint "interface{...}" +3 lines
Constraint.interface{...} ""
Constraint.interface{...}.M "func()"
Constraint.~int | struct{int} ""
T "struct{...}" +2 lines
T.F "P"