Closed erstam closed 7 months ago
Can you give more concrete example with exact input:
Here is mine:
(w)➜ ifacemaker git:(vb-upgrade) ✗ cat tests/variadics.go
package tests
import "github.com/vburenin/ifacemaker/tests/pkg"
type VariadicTest struct {
// Name is the name of the test.
}
func (vt *VariadicTest) Name(a string, b ...string) string {
return "VariadicTest"
}
func (vt *VariadicTest) AddFoo(a ...*pkg.MyFoo) string {
return "VariadicTest"
}
(w)➜ ifacemaker git:(vb-upgrade) ✗ ./ifacemaker -f tests/variadics.go -s VariadicTest --iface VariadTest --pkg tests
// Code generated by ifacemaker; DO NOT EDIT.
package tests
import (
"github.com/vburenin/ifacemaker/tests/pkg"
)
// VariadTest ...
type VariadTest interface {
Name(a string, b ...string) string
AddFoo(a ...*pkg.MyFoo) string
}
Hello, it has been a long time and now it seems I am not able to reproduce this issue anymore. Using fairly the same example as you I get the same result. So I think you can mark this one as solved. Thanks!
Seems ok, will reopen if bug happens again
I have a Bar struct that implements
AddFoo()
andGetFoo()
.AddFoo()
takes a variadic list ofFoo
instances.Foo
is declared inpkg
which is imported.Ifacemaker produces this: