blob: 07f2ed9ad4625fad9c71ded67b453a0c789d97f8 [file] [log] [blame]
Basic tests of textDocument/documentSymbols with generics.
-- flags --
-min_go=go1.18
-- symbol.go --
//@symbol(want)
//go:build go1.18
// +build go1.18
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"