compiler: type of string index expression is byte
authorIan Lance Taylor <iant@golang.org>
Sun, 6 Dec 2020 02:42:30 +0000 (18:42 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 7 Dec 2020 17:44:18 +0000 (09:44 -0800)
commitc3a1b3e6fb24ccf6f45e7d6ce904d5549bba01d6
tree2676c757088d56745e0de9668d6f99c55c6c9e1b
parent7482d5a3acb7a8a5564f5cddc4f9d2ebbaea75e4
compiler: type of string index expression is byte

To make this work from the do_type method, add "byte" and "rune" to
the list of known integer types, and look them up that way rather than
via gogo->lookup_global.

For golang/go#8745

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275653
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/statements.cc
gcc/go/gofrontend/types.cc
gcc/go/gofrontend/types.h
gcc/go/gofrontend/wb.cc