]> Cypherpunks repositories - gostls13.git/commit
go/types: collect type info for type ...T in variadic functions
authorRobert Griesemer <gri@golang.org>
Fri, 19 Oct 2018 04:21:46 +0000 (21:21 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 19 Oct 2018 18:54:01 +0000 (18:54 +0000)
commit0287d8ed1b12229f2ab493602ffa497caabf747c
tree064bde57190a364f5baa7233889520887e937f46
parent41c0b9eb88fa0e161d7564539a8beb3f79247f44
go/types: collect type info for type ...T in variadic functions

Because the code type-checks T rather than ...T (and then corrects
the type to []T "manually"), it didn't automatically record the
type for the ast.Expr corresponding to ...T. Do it manually.

Fixes #28277.

Change-Id: I3d9aae310c90b01f52d189e70c48dd9007f72207
Reviewed-on: https://go-review.googlesource.com/c/143317
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/types/api_test.go
src/go/types/typexpr.go