I've been trying to debug a really strange issue and stuck believing it 
being a bug in the Go compiler toolchain.

interface conversion: backends.Client is *mock.client, not *mock.client

Steps to reproduce:

$ cd $(mktemp -d)
$ git clone https://github.com/leonklingele/pick -b interface-conversion-issue 
pick-interface-conversion-issue
$ cd pick-interface-conversion-issue
$ make test
..
=== RUN   TestNewBackend
--- FAIL: TestNewBackend (0.00s)
panic: interface conversion: backends.Client is *mock.client, not 
*mock.client [recovered]
panic: interface conversion: backends.Client is *mock.client, not 
*mock.client
..

Which effectively states that *mock.client != *mock.client :o

Using  c, err := _new(config)
instead of c, err := backends.NewWithType(clientName, config)
works fine which is really odd as both _new and backends.NewWithType return 
a backends.Client

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to