Debian Codegraph @

libgo/misc/cgo/testshared/testdata/issue25065/a.go

raw
1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Package issue25065 has a type with a method that is
6 // 1) referenced in a method expression
7 // 2) not called
8 // 3) not converted to an interface
9 // 4) is a value method but the reference is to the pointer method
10 // These cases avoid the call to makefuncsym from typecheckfunc, but we
11 // still need to call makefuncsym somehow or the symbol will not be defined.
12 package issue25065
13
14 type T int
15
16 func (t T) M() {}
17
18 func F() func(*T) {
19 return (*T).M
20 }