Re: [go-nuts] [Go Spec]Confused about Assignability in Golang Specification

2020-02-23 Thread Michael Poole
On Sun, Feb 23, 2020 at 8:19 AM Jimu Yang wrote: > I am reading the doc about Assignability in Golang Specification > . It says: > > A value x is *assignable* to a variable > of type T ("x is assignable to T") >

Re: [go-nuts] [Go Spec]Confused about Assignability in Golang Specification

2020-02-23 Thread Ian Lance Taylor
On Sun, Feb 23, 2020 at 5:19 AM Jimu Yang wrote: > > string1's type string and str have identical underlying type (string) and > string is not a defined type. "string" is a defined type. See https://golang.org/ref/spec#String_types. Ian -- You received this message because you are

Re: [go-nuts] [Go Spec]Confused about Assignability in Golang Specification

2020-02-23 Thread Jan Mercl
Both string1 and str1 have defined types while the quoted specs rule says "at least one of V or T is not a defined type.". On Sun, Feb 23, 2020, 14:19 Jimu Yang wrote: > I am reading the doc about Assignability in Golang Specification > . It says: > >

[go-nuts] [Go Spec]Confused about Assignability in Golang Specification

2020-02-23 Thread Jimu Yang
I am reading the doc about Assignability in Golang Specification . It says: A value x is *assignable* to a variable of type T ("x is assignable to T") if one of the following conditions applies: - ... -