3 // Regression test for https://golang.org/issue/23925
5 type stringFlagImpl string
7 func (*stringFlagImpl) Set(s string) error { return nil }
11 func (*boolFlagImpl) Set(s string) error { return nil }
12 func (*boolFlagImpl) extra() {}
14 // A copy of flag.boolFlag interface, without a dependency.
15 // Must appear first, so that it becomes the owner of the Set methods.
16 type boolFlag interface {
21 // A copy of flag.Value, without adding a dependency.
22 type flagValue interface {
27 var x flagValue = new(stringFlagImpl)
30 var y boolFlag = new(boolFlagImpl)
36 // main --> (*boolFlagImpl).Set
37 // main --> (*boolFlagImpl).Set
38 // main --> (*stringFlagImpl).Set