3 // Copyright 2016 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // The linker can prune methods that are not directly called or
8 // assigned to interfaces, but only if reflect.Type.Method is
9 // never used. Test it here.
19 func (m M) UniqueMethodName() {
25 type MyType interface {
26 Method(int) reflect.Method
30 var t MyType = reflect.TypeOf(v)
31 t.Method(0).Func.Interface().(func(M))(v)
33 panic("UniqueMethodName not called")