aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/xml
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2023-08-21 15:50:18 -0700
committerGopher Robot <gobot@golang.org>2023-08-29 23:22:35 +0000
commit1f8f2ab9661c78876d8a8cb0ccc4625728842b26 (patch)
tree29272789038044c8173a49aec8bb2c246312c5c1 /src/encoding/xml
parent22eba6a1f8421425c87fa82dcd526d39912f5af6 (diff)
downloadgo-1f8f2ab9661c78876d8a8cb0ccc4625728842b26.tar.xz
go/types, types2: remove order dependency in inference involving channels
In inexact unification, when a named type matches against an inferred unnamed type, we change the previously inferred type to the named type. This preserves the type name and assignability. We have to do the same thing when encountering a directional channel: a bidirectional channel can always be assigned to a directional channel but not the other way around. Thus, if we see a directional channel, we must choose the directional channel. This CL extends the previously existing logic for named types to directional channels and also makes the code conditional on inexact unification. The latter is an optimization - if unification is exact, type differences don't exist and updating an already inferred type has no effect. Fixes #62157. Change-Id: I807e3b9f9ab363f9ed848bdb18b2577b1d680ea7 Reviewed-on: https://go-review.googlesource.com/c/go/+/521500 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>
Diffstat (limited to 'src/encoding/xml')
0 files changed, 0 insertions, 0 deletions