]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: document Typ slice
authorRobert Griesemer <gri@golang.org>
Wed, 20 Dec 2017 23:14:05 +0000 (15:14 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 20 Dec 2017 23:42:22 +0000 (23:42 +0000)
Fixes #22628.

Change-Id: Ib7aff8043e477af18c448d6b778f159b23fb5a92
Reviewed-on: https://go-review.googlesource.com/85075
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/go/types/universe.go

index cc3bd5a370bd9a6621cc82e8ea7c037d0736bbb4..07d7078ae25b780534d42cf0347d01f28399f5a4 100644 (file)
@@ -20,6 +20,12 @@ var (
        universeRune *Basic // int32 alias, but has name "rune"
 )
 
+// Typ contains the predeclared *Basic types indexed by their
+// corresponding BasicKind.
+//
+// The *Basic type for Typ[Byte] will have the name "uint8".
+// Use Universe.Lookup("byte").Type() to obtain the specific
+// alias basic type named "byte" (and analogous for "rune").
 var Typ = []*Basic{
        Invalid: {Invalid, 0, "invalid type"},