]> Cypherpunks repositories - gostls13.git/commit
go/types: better position for invalid slice indices error
authorRobert Findley <rfindley@google.com>
Thu, 18 Nov 2021 00:45:49 +0000 (19:45 -0500)
committerRobert Findley <rfindley@google.com>
Thu, 18 Nov 2021 02:19:50 +0000 (02:19 +0000)
commitf1cc5294290b33889d48a3185b3c3711531881e0
tree2155dfed5c624b187bb594bc7452fd2db19cf236
parent72f0976ac45fcb7f3fd6d47a3ac5c96a78edd59d
go/types: better position for invalid slice indices error

This is a port of CL 363671 from types2 to go/types. Also adjust the
error message to match types2 ("invalid" vs "swapped").

Change-Id: I662a73c915814fea14bfcb1ebde0fbf39589f022
Reviewed-on: https://go-review.googlesource.com/c/go/+/364902
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/index.go
src/go/types/testdata/check/expr3.src