blob: 1d54520ac6a27dfb4b9d1811bd62910471894437 [file]
Copyright 2026 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
Test file for API.symbols. We just want to verify
that NewAPI gets all the exported symbols.
-- want --
type A
type C
const C1
const C3
const C4
var D
func F
type G1
type G2
func GF1
func GF2
type I
type S
var V1
var V3
var V4
-- a.go --
package p
type A int
type (
b int
C int
)
var D = 2
func F() {
type T int
}
func (A) M() {}
func (*A) N() {}
func (A) u() {}
func (b) M() {}
func (*b) N() {}
func (*b) u() {}
const (
C1 = 1
c2 = 2
C3, C4 = 3, 4
)
var (
V1 = 1
v2 = 2
V3, V4 int
)
type G1[T any] struct {
X T
}
type (
G2[T any, U comparable] []T
g3[T any] map[T]string
)
type S struct {
X int
}
type I interface {
M()
}
type sUnexported struct{}
type iUnexported interface{}
func GF1[T any](x T) T { return x }
func GF2[T any, U comparable](x T, y U) {}
func gf3[T any](x T) {}
func (G1[T]) M() {}
func (*G1[T]) N() {}
func (G1[T]) u() {}
func f() {}
func init() {}
const _ = 0
var _ = 0
type _ int
func _() {}