On Tue, Nov 1, 2016 at 6:54 AM, Steven Hartland <ste...@multiplay.co.uk> wrote:
>
> It seems that even though the returned type matches the interface within the
> function argument go doesn't do the coercion needed to make this happen,
> instead if errors:
> cannot use NewMyType (type func() (*MyType, error)) as type func()
> (MyInterface, error) in argument to wibble.

https://golang.org/doc/faq#covariant_types

Ian

-- 
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