]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: cleanup and fix Checker.index
authorMatthew Dempsky <mdempsky@google.com>
Thu, 22 Apr 2021 01:22:35 +0000 (18:22 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 22 Apr 2021 21:23:59 +0000 (21:23 +0000)
commitf7afdfd48383c4f0ea8653ea9f8c7b9a3d93abee
tree0cb2a09d6cf70f1e9d070b24a72add0b16c4d3aa
parentcfe5d79c5c2c9888a0e56e089dca99e405a225b9
go/types: cleanup and fix Checker.index

A couple minor spec compliance issues: constant, typed index operands
must still be representable as type "int", but should also be recorded
as their original type.

Fixes #45667.

Change-Id: Iefeb29f20a8e48350af83a62c9ae0e92198c5ef7
Reviewed-on: https://go-review.googlesource.com/c/go/+/312591
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/builtins_test.go
src/go/types/check_test.go
src/go/types/expr.go