]> Cypherpunks repositories - gostls13.git/commit
go/types: report correct argument types for make() built-in calls
authorRobert Griesemer <gri@golang.org>
Sun, 23 Feb 2020 21:36:46 +0000 (13:36 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 24 Feb 2020 16:55:58 +0000 (16:55 +0000)
commitd243408ae5ec14131dfd83923d2c140325158c0d
tree54d249bd81babe283cf6f507183cd0db798f093d
parent3093959ee10f5c28211094e784c954f6a304b9c9
go/types: report correct argument types for make() built-in calls

Change Checker.index to return the type and constant index value
rather than just a boolean valid flag and the constant value.
While at it, rename some variables and simplify the control flow.

Adjust all uses of Checker.index to new signature. In code for
make() built-in, collect type information for signature reporting.

Fixes #37393.

Change-Id: Id70196faa9539ed5a0d6b59e0f3ea05e05f2f6a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/220585
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/go/types/builtins.go
src/go/types/builtins_test.go
src/go/types/expr.go