diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2017-06-06 22:17:50 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-06-07 00:42:59 +0000 |
| commit | 703a9baf5c210ac3955ddaa9df1efcdb2786ab1d (patch) | |
| tree | 781703889303f1e4cd6c7c5a8bac60870a09704b /src/runtime | |
| parent | a027466e4b6d594fd8b562094fe63a9c4c6ec4f7 (diff) | |
| download | go-703a9baf5c210ac3955ddaa9df1efcdb2786ab1d.tar.xz | |
builtin: use type aliases for rune and byte
As motivated by https://golang.org/design/18130-type-alias which says:
https://github.com/golang/proposal/blob/master/design/18130-type-alias.md#relationship-to-byte-and-rune
> The language specification already defines byte as an alias for
> uint8 and similarly rune as an alias for int32, using the word alias
> as an informal term. It is a goal that the new type declaration
> semantics not introduce a different meaning for alias. That is, it
> should be possible to describe the existing meanings of byte and
> uint8 by saying that they behave as if predefined by:
>
> type byte = uint8
> type rune = int32
So, do that. Seems to work.
Updates #18130
Change-Id: I0740bab3f8fb23e946f3542fdbe819007a99465a
Reviewed-on: https://go-review.googlesource.com/45017
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions
