]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: don't panic when checking a ListExpr in exprInternal
authorRob Findley <rfindley@google.com>
Tue, 27 Apr 2021 02:25:56 +0000 (22:25 -0400)
committerRobert Findley <rfindley@google.com>
Tue, 27 Apr 2021 13:46:16 +0000 (13:46 +0000)
commit39844971fb92992305babb4b64d50faa7fea40a0
tree1d76715b2aa693eb6d1df36bc7737f51934eb4a8
parent6edd573218709e50dc73c49d5ae465819b7ef226
go/types: don't panic when checking a ListExpr in exprInternal

As an alternative to CL 312149, add a catch-all error message in
exprInternal when encountering a ListExpr, rather than panicking.

We still might want something like CL 312149 to improve the error
message or recovery from bad indexing.

Change-Id: I865f7cc4eefa4a3b7bd8f3100df96d0144e1712f
Reviewed-on: https://go-review.googlesource.com/c/go/+/313909
Trust: Robert Findley <rfindley@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/internal/typeparams/notypeparams.go
src/go/internal/typeparams/typeparams.go
src/go/types/expr.go
src/go/types/fixedbugs/issue45635.go2