Hi all,

I confronted with a confusing problem regarding struct conversion.

See https://play.golang.org/p/n6NfjsthHP

The declarations of PrivateKey and PublicKey are copied from crypto/rsa, 
but the code can not be compiled.
It can be compiled successfully if the embedded field PublicKey is replaced 
with rsa.PublicKey

According to the spec, two structs are convertible as long as their 
underlying types are identical.

Is this case my misunderstanding or just a bug (either in the compiler or 
in the spec)?

mura,

Thanks

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