]> Cypherpunks repositories - gostls13.git/commit
go/types: better handle arrays whose length expression is invalid
authorRobert Griesemer <gri@golang.org>
Tue, 13 Feb 2018 00:42:31 +0000 (16:42 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 13 Feb 2018 20:31:05 +0000 (20:31 +0000)
commit1006f703ffc191dbcce3135f1992f1a24a50cb52
treec987ec00b51b7382aad27bffec36adaf1dc2201b
parentecba3714a3291073a2cde989c255de568bd1d512
go/types: better handle arrays whose length expression is invalid

While doing that, establish a negative value as signal for unknown
array lengths and adjust various array-length processing code to
handle that case.

Fixes #23712.

Change-Id: Icf488faaf972638b42b22d4b4607d1c512c8fc2c
Reviewed-on: https://go-review.googlesource.com/93438
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/types/builtins.go
src/go/types/predicates.go
src/go/types/sizes.go
src/go/types/testdata/importC.src
src/go/types/type.go
src/go/types/typexpr.go