diff options
Diffstat (limited to 'src/cmd/compile/internal/gc/universe.go')
-rw-r--r-- | src/cmd/compile/internal/gc/universe.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/gc/universe.go b/src/cmd/compile/internal/gc/universe.go index 30c9c3783a..d23aebeafb 100644 --- a/src/cmd/compile/internal/gc/universe.go +++ b/src/cmd/compile/internal/gc/universe.go @@ -398,6 +398,14 @@ func lexinit1() { // errortype.Orig = makeErrorInterface() s.Def = typenod(errortype) + // We create separate byte and rune types for better error messages + // rather than just creating type alias *Sym's for the uint8 and + // int32 types. Hence, (bytetype|runtype).Sym.isAlias() is false. + // TODO(gri) Should we get rid of this special case (at the cost + // of less informative error messages involving bytes and runes)? + // (Alternatively, we could introduce an OTALIAS node representing + // type aliases, albeit at the cost of having to deal with it everywhere). + // byte alias s = Pkglookup("byte", builtinpkg) bytetype = typ(TUINT8) |