1// Copyright 2012 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 5package one 6 7// Issue 2877 8type T struct { 9 f func(t *T, arg int) 10 g func(t T, arg int) 11} 12 13func (t *T) foo(arg int) {} 14func (t T) goo(arg int) {} 15 16func (t *T) F() { t.f = (*T).foo } 17func (t *T) G() { t.g = T.goo } 18 19 20 21