On Sat, Jul 28, 2018 at 9:13 AM, Paul J. Lucas <[email protected]> wrote:
>
> Is such type "slicing" expected behavior?  (This was a most annoying bug to 
> track down.)

Yes.  Go is not C++.  A struct with an embedded field is not
equivalent to a child class.  If you are familiar with C++ you may
find it helpful to read the "Interfaces" section of
https://github.com/golang/go/wiki/GoForCPPProgrammers .

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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to