aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/call.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-02-17 17:06:53 -0800
committerRobert Griesemer <gri@golang.org>2021-02-18 20:47:11 +0000
commit653386a89a702b54bb01be893cfd30cddb0e6107 (patch)
tree8cdea0b59711b9a9377f64ae3e1117aa9eddd31d /src/cmd/compile/internal/types2/call.go
parent5e4da8670b13370392a9195930e3b4bbe5f1944f (diff)
downloadgo-653386a89a702b54bb01be893cfd30cddb0e6107.tar.gz
go-653386a89a702b54bb01be893cfd30cddb0e6107.zip
[dev.typeparams] cmd/compile/internal/types2: replace Named, TypeParam methods with functions
This removes two more converter methods in favor of functions. This further reduces the API surface of types2.Type and matches the approach taken in go/types. Change-Id: I3cdd54c5e0d1e7664a69f3697fc081a66315b969 Reviewed-on: https://go-review.googlesource.com/c/go/+/293292 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/call.go')
-rw-r--r--src/cmd/compile/internal/types2/call.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/call.go b/src/cmd/compile/internal/types2/call.go
index 10db701324..67a76d14fb 100644
--- a/src/cmd/compile/internal/types2/call.go
+++ b/src/cmd/compile/internal/types2/call.go
@@ -563,7 +563,7 @@ func (check *Checker) selector(x *operand, e *syntax.SelectorExpr) {
check.errorf(e.Sel, "cannot call pointer method %s on %s", sel, x.typ)
default:
var why string
- if tpar := x.typ.TypeParam(); tpar != nil {
+ if tpar := asTypeParam(x.typ); tpar != nil {
// Type parameter bounds don't specify fields, so don't mention "field".
switch obj := tpar.Bound().obj.(type) {
case nil: