]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] go/types: import expr changes from dev.go2go
authorRob Findley <rfindley@google.com>
Wed, 6 Jan 2021 17:25:10 +0000 (12:25 -0500)
committerRobert Findley <rfindley@google.com>
Mon, 11 Jan 2021 18:22:49 +0000 (18:22 +0000)
commit81cd99858d2ae99e7ac2785367ee5b97de9e6e25
treea1eb1bada04368aec6a5548fdf30f60c8dcb5b19
parent822aeacd9ed0630f84552d3120a12ddaa65b23cc
[dev.typeparams] go/types: import expr changes from dev.go2go

This change imports assignments.go, builtins.go, call.go,
conversions.go, and expr.go from the dev.go2go branch.

Changes from dev.go2go:
 - Update error positions and codes.
 - Fix some failing tests due to error message changes.
 - Fix a bug in exprInternal where normal IndexExpr checking wasn't
   proceeding in the case of a non-generic indexed func.
 - Fix the type of the second operand in commaerr expressions to be
   universeError. We should add tests in a later CL.

This code was mostly reviewed, but call.go and expr.go were marked
incomplete.  Additionally, these two files had notably diverged from
types2, requiring further understanding.

The dev.go2go branch significantly simplified the type checking of
arguments, resulting in the removal of the _InvalidDotDotDot operand
error code.

Change-Id: Iba2cef95e17bfaa6da6d4eb94c2e2ce1c691ac44
Reviewed-on: https://go-review.googlesource.com/c/go/+/282193
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Robert Findley <rfindley@google.com>
src/go/types/assignments.go
src/go/types/builtins.go
src/go/types/call.go
src/go/types/conversions.go
src/go/types/errorcodes.go
src/go/types/eval_test.go
src/go/types/expr.go
src/go/types/testdata/builtins.src
src/go/types/testdata/expr3.src
src/go/types/testdata/stmt0.src