1
0
mirror of https://github.com/golang/go synced 2024-11-23 05:50:05 -07:00
go/test/typeparam
Dan Scales 12e15d430d [dev.typeparams] cmd/compile: handle calling a method on a type param in stenciling
- Have to delay the extra transformation on methods invoked on a type
   param, since the actual transformation (including path through
   embedded fields) will depend on the instantiated type. I am currently
   doing the transformation during the stencil substitution phase. We
   probably should have a separate pass after noder2 and stenciling,
   which drives the extra transformations that were in the old
   typechecker.

 - We handle method values (that are not called) and method calls. We
   don't currently handle method expressions.

 - Handle type substitution in function types, which is needed for
   function args in generic functions.

 - Added stringer.go and map.go tests, testing the above changes
   (including constraints with embedded interfaces).

Change-Id: I3831a937d2b8814150f75bebf9f23ab10b93fa00
Reviewed-on: https://go-review.googlesource.com/c/go/+/290550
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dan Scales <danscales@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Dan Scales <danscales@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-02-10 01:44:48 +00:00
..
fact.go [dev.typeparams] cmd/compile/internal/types2: conversions to type parameters are not constant 2021-02-08 22:24:09 +00:00
importtest.go [dev.typeparams] cmd/compile: use existing findpkg algorithm when importing through types2 2020-11-11 01:11:43 +00:00
map.go [dev.typeparams] cmd/compile: handle calling a method on a type param in stenciling 2021-02-10 01:44:48 +00:00
min.go [dev.typeparams] cmd/compile: add stenciling of simple generic functions 2021-02-05 16:40:12 +00:00
smoketest.go
stringer.go [dev.typeparams] cmd/compile: handle calling a method on a type param in stenciling 2021-02-10 01:44:48 +00:00
sum.go [dev.typeparams] cmd/compile: allow generic funcs to call other generic funcs for stenciling 2021-02-08 19:32:55 +00:00
tparam1.go [dev.typeparams] cmd/compile/internal/types2: set compiler error message for undeclared variable 2020-12-02 04:48:13 +00:00