Thank you!

On Tuesday, April 5, 2022 at 10:05:40 PM UTC+3 Ian Lance Taylor wrote:

> On Tue, Apr 5, 2022 at 11:05 AM Amit Lavon <amitl...@gmail.com> wrote:
> >
> > When we use an interface as a type parameter, does it mean that calls to 
> that interface will be replaced with calls to the concrete type?
> >
> > To demonstrate, consider https://go.dev/play/p/j4N8G_n-3uG .
> > Will the compiler create a static call to MyDoer.Do instead of a virtual 
> call to Doer.Do?
>
> Occasionally, yes. In general, no. It depends, and it will likely
> vary between different Go compilers and different releases of the same
> Go compiler.
>
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/2a760092-7cca-42c0-a806-89223b6f2851n%40googlegroups.com.

Reply via email to