diff options
author | Rob Findley <rfindley@google.com> | 2021-07-16 09:21:36 -0400 |
---|---|---|
committer | Robert Findley <rfindley@google.com> | 2021-07-16 23:04:55 +0000 |
commit | b98b8b9b5be2ccbfc5aaf2a983fe5d439f91bc94 (patch) | |
tree | 0a7d27ab67a958c95fbf2f9114038f6f69e82795 /src/go/types/expr.go | |
parent | fce6290e0ac18ca2d5cc635adf4c3a77b375a49a (diff) | |
download | go-b98b8b9b5be2ccbfc5aaf2a983fe5d439f91bc94.tar.gz go-b98b8b9b5be2ccbfc5aaf2a983fe5d439f91bc94.zip |
[dev.typeparams] go/types: remove unused *Checker arguments (cleanup)
This is a straightforward port of CL 331512 to go/types. API usage in
methodset.go was also updated.
Change-Id: I6701265c9d2ae40eb9aa0ea5f00c98ce3516edab
Reviewed-on: https://go-review.googlesource.com/c/go/+/335009
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/go/types/expr.go')
-rw-r--r-- | src/go/types/expr.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/go/types/expr.go b/src/go/types/expr.go index c8adea45e2..edd7caf1c9 100644 --- a/src/go/types/expr.go +++ b/src/go/types/expr.go @@ -955,7 +955,7 @@ func (check *Checker) binary(x *operand, e ast.Expr, lhs, rhs ast.Expr, op token return } - if !check.identical(x.typ, y.typ) { + if !Identical(x.typ, y.typ) { // only report an error if we have valid types // (otherwise we had an error reported elsewhere already) if x.typ != Typ[Invalid] && y.typ != Typ[Invalid] { @@ -1281,7 +1281,7 @@ func (check *Checker) exprInternal(x *operand, e ast.Expr, hint Type) exprKind { xkey := keyVal(x.val) if asInterface(utyp.key) != nil { for _, vtyp := range visited[xkey] { - if check.identical(vtyp, x.typ) { + if Identical(vtyp, x.typ) { duplicate = true break } @@ -1468,7 +1468,7 @@ func (check *Checker) typeAssertion(at positioner, x *operand, xtyp *Interface, } var msg string if wrongType != nil { - if check.identical(method.typ, wrongType.typ) { + if Identical(method.typ, wrongType.typ) { msg = fmt.Sprintf("missing method %s (%s has pointer receiver)", method.name, method.name) } else { msg = fmt.Sprintf("wrong type for method %s (have %s, want %s)", method.name, wrongType.typ, method.typ) |