qur / withmock

Automatic Go package mock generation tool
Other
71 stars 9 forks source link

Cannot use type in function argument #13

Closed imosquera closed 10 years ago

imosquera commented 11 years ago

I get the following error when using mocktest:

src/github.com/imosquera/uploadthis/uploadthis/main.go:23: cannot use commanders (type map[string]"github.com/imosquera/uploadthis/commands".Commander) as type map[string]"github.com/imosquera/uploadthis/commands".Commander in function argument

This corresponds to this code sgement: https://github.com/imosquera/uploadthis/blob/command-org/uploadthis/main.go#L21

I'm not sure why it would do this at all but can't find a way around it. If i use "go build" it all compiles correctly. Any thoughts?

Note: this happens only when I "//mock" the commands package and works fine without it.

qur commented 11 years ago

What output do you get when running with the -raw option? This looks a bit like the error that prompted issue #11, but it's hard to say with the rewriting enabled.

imosquera commented 10 years ago

I just noticed you wrote back here. I unfortunately changed my code and can't reproduce this error any longer. I'll let you know if it happens again.

qur commented 10 years ago

If this happens again, then please raise a new issue. Otherwise I am going to assume this was issue #11.