]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: don't return an array type with invalid length
authorRobert Findley <rfindley@google.com>
Tue, 9 Nov 2021 19:56:39 +0000 (14:56 -0500)
committerRobert Findley <rfindley@google.com>
Tue, 9 Nov 2021 22:14:19 +0000 (22:14 +0000)
commitcb908f1d4dd24dad17105022df7b0e96ac1d6988
treed13133ee1462e9672e5a382318c00492f20b9fc2
parent4aa0746f6abae7dc112883e79f93993a430bd340
go/types: don't return an array type with invalid length

In preparation for porting CL 361412, fix a discrepancy in go/types,
where [-1]T is returned for an array type with invalid length.

Change-Id: Ia32f5b66c9c561ccf0c32af1922fc4690c66dbc3
Reviewed-on: https://go-review.googlesource.com/c/go/+/362738
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/api_test.go
src/go/types/typexpr.go