]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: simplify unify.inferred signature
authorRobert Griesemer <gri@golang.org>
Thu, 9 Feb 2023 00:51:58 +0000 (16:51 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 9 Feb 2023 21:13:56 +0000 (21:13 +0000)
commitda47cd6192822daef997df6bbbc0d3a6bdbdae13
treee936f180551f56cefd60ec1154424e1da9eb4102
parente0504bcd72a1ee477e29fb429c86f3af37197293
go/types, types2: simplify unify.inferred signature

Rather than referring back to the type parameter list stored with
the unifier, return inferred types for a given list of type parameters.
This decouples the unifier more and opens the door for inference to
consider type parameters from multiple types for inference.

While at it, introduce an internal flag to control whether
inference results of the two inference implementations should
be compared or not.

Change-Id: I23b254c6c1c750f5bd1360aa2bb088cc466434f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/466795
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types2/infer.go
src/cmd/compile/internal/types2/infer2.go
src/cmd/compile/internal/types2/unify.go
src/go/types/infer.go
src/go/types/infer2.go
src/go/types/unify.go