Source file src/cmd/cgo/internal/testshared/testdata/issue25065/a.go

     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  //
    11  // These cases avoid the call to makefuncsym from typecheckfunc, but we
    12  // still need to call makefuncsym somehow or the symbol will not be defined.
    13  package issue25065
    14  
    15  type T int
    16  
    17  func (t T) M() {}
    18  
    19  func F() func(*T) {
    20  	return (*T).M
    21  }
    22  

View as plain text