diff options
| author | Robert Griesemer <gri@golang.org> | 2022-01-10 17:29:21 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2022-01-12 01:49:33 +0000 |
| commit | 3d3f5d912b776424e50be276bc3a4ae02bf8d143 (patch) | |
| tree | 78a05c2b7ab9408049681216591dd94366bdde8d /src/encoding | |
| parent | 3df44722013b54790e97a32aff945708bd1b62f7 (diff) | |
| download | go-3d3f5d912b776424e50be276bc3a4ae02bf8d143.tar.xz | |
go/types, types2: do not run CTI before FTI
Until now, CTI (constraint type inference) was run before
FTI (function type inference). This lead to situations
where CTI infered a type that is missing necessary methods
even though a function argument of correct type was given.
This can happen when constraint type inference produces a
inferred type that is the structural type of multiple types,
which then is an underlying type, possibly without methods.
This CL removes the initial CTI step; it is only applied
after FTI with type arguments is run, and again after FTI
with untyped arguments is run.
Various comments are adjusted to reflect the new reality.
Fixes #50426.
Change-Id: I700ae6e762d7aa00d742943a2880f1a1db33c2b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/377594
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions
