]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: add support for inferring type instances
authorRobert Findley <rfindley@google.com>
Fri, 15 Oct 2021 14:52:55 +0000 (10:52 -0400)
committerRobert Findley <rfindley@google.com>
Mon, 18 Oct 2021 22:55:05 +0000 (22:55 +0000)
commit73971784dc586a5db3b81dfdd41954f650d493ac
tree8332eae4ad95d7b5b5af3d6b5a9732b6e1c0ddbc
parent3befaf0cdb18420f45acfa7cee725297aa550faf
go/types: add support for inferring type instances

Add constraint type inference for type instances, to be consistent with
inference of function values.

Fixes #47990

Change-Id: Ib99b5215cb2da5c10badc4de7e9e60ca0e48489f
Reviewed-on: https://go-review.googlesource.com/c/go/+/356489
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>
src/go/types/call.go
src/go/types/instantiate.go
src/go/types/named.go
src/go/types/testdata/check/funcinference.go2 [moved from src/go/types/testdata/check/tinference.go2 with 77% similarity]
src/go/types/testdata/check/typeinference.go2 [new file with mode: 0644]
src/go/types/testdata/check/typeinst2.go2
src/go/types/testdata/check/typeinstcycles.go2 [new file with mode: 0644]
src/go/types/typexpr.go