On 06/24/2017 08:16 PM, Ivan Bertona wrote: > Hello, > > When I try to compile this piece of code: >
I think it violates the second assignability rule since both 'string' and MyString are named types. string happens to be a a pre-declared named type: https://golang.org/ref/spec#Assignability Whereas []byte is unnamed therefore at least one of the types in the expression is unnamed. Here are a couple of relevant blog posts about it: https://medium.com/learning-the-go-programming-language http://www.laktek.com/2012/01/27/learning-go-types/ Someone please correct me if I'm wrong. -ayan -- 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.