]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: record types for union subexpressions
authorRobert Findley <rfindley@google.com>
Tue, 14 Dec 2021 17:48:31 +0000 (12:48 -0500)
committerRobert Findley <rfindley@google.com>
Tue, 14 Dec 2021 23:20:01 +0000 (23:20 +0000)
commit8108444eaa7ee45a74b2f2da6d21dd1d2b0c0352
tree5d780bcfb4876c6fbdd134d07ac56f877d3e2e90
parentaf05064f978729f3b066e1d627633c11c5e267e2
go/types: record types for union subexpressions

Prior to unions, unary and binary expressions always had a recorded
type. Preserve this by recording a type for all unary and binary
expressions encountered while parsing a union type.

Updates #50093

Change-Id: I5ba20f37854760596350d91ea325dc98e67e115a
Reviewed-on: https://go-review.googlesource.com/c/go/+/371757
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/go/types/api.go
src/go/types/api_test.go
src/go/types/union.go