]> Cypherpunks repositories - gostls13.git/commit
go/types: factor out index/slice expr handling
authorRob Findley <rfindley@google.com>
Tue, 27 Apr 2021 20:30:26 +0000 (16:30 -0400)
committerRobert Findley <rfindley@google.com>
Tue, 27 Apr 2021 21:55:07 +0000 (21:55 +0000)
commit214c8dd80c4059543b91d45c55ab12e8d58dec48
treec1aab6553bd15d3bc03dbf0fc2e80d5efc9112cc
parent645cb62ee3926ce88b8c2cf556fed6dea3d525ce
go/types: factor out index/slice expr handling

This is a port of CL 308370 to go/types. There are some differences in
the index checking code, but the methodology for moving the code was the
same: replace `goto Error` with `x.mode = invalid; return`.

Change-Id: I880f577a7720e6ad8a5b096207001fcf7620396d
Reviewed-on: https://go-review.googlesource.com/c/go/+/312095
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/expr.go
src/go/types/index.go [new file with mode: 0644]