blob: 9c9d2594a3c67723e10d14e6164963c74b6f641f [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.
// reflect.Value.MethodByName as an element of a composite literal built in a
// function must keep all exported methods.
package main
import (
"os"
"reflect"
)
type T int
func (T) M() {}
func main() {
table := []func(reflect.Value, string) reflect.Value{reflect.Value.MethodByName}
table[0](reflect.ValueOf(T(1)), os.Args[0]).Call(nil)
}