• Russ Cox's avatar
    allow direct conversion between string and named []byte, []rune · 6e3e3809
    Russ Cox authored
    The allowed conversions before and after are:
            type Tstring string
            type Tbyte []byte
            type Trune []rune
    
            string <-> string  // ok
            string <-> []byte  // ok
            string <-> []rune // ok
            string <-> Tstring // ok
            string <-> Tbyte // was illegal, now ok
            string <-> Trune // was illegal, now ok
    
            Tstring <-> string  // ok
            Tstring <-> []byte  // ok
            Tstring <-> []rune // ok
            Tstring <-> Tstring // ok
            Tstring <-> Tbyte // was illegal, now ok
            Tstring <-> Trune // was illegal, now ok
    
    Update spec, compiler, tests.  Use in a few packages.
    
    We agreed on this a few months ago but never implemented it.
    
    Fixes #1707.
    
    R=golang-dev, gri, r
    CC=golang-dev
    https://golang.org/cl/5421057
    6e3e3809
Name
Last commit
Last update
..
5a Loading commit data...
5c Loading commit data...
5g Loading commit data...
5l Loading commit data...
6a Loading commit data...
6c Loading commit data...
6g Loading commit data...
6l Loading commit data...
8a Loading commit data...
8c Loading commit data...
8g Loading commit data...
8l Loading commit data...
cc Loading commit data...
cgo Loading commit data...
cov Loading commit data...
gc Loading commit data...
go Loading commit data...
godoc Loading commit data...
gofix Loading commit data...
gofmt Loading commit data...
goinstall Loading commit data...
gomake Loading commit data...
gopack Loading commit data...
gotest Loading commit data...
govet Loading commit data...
goyacc Loading commit data...
hgpatch Loading commit data...
ld Loading commit data...
nm Loading commit data...
prof Loading commit data...
Makefile Loading commit data...