Unreviewed changes
10 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/internal/types/testdata/spec/structLits.go
Insertions: 1, Deletions: 1.
@@ -31,9 +31,9 @@
_ = A{A /* ERROR "unknown field A in struct literal of type A, but does have a" */ : 0}
_ = A{X /* ERROR "unknown field X in struct literal of type A, but does have x" */ : 0}
_ = A{a: 0, b: 0, c: 0}
- _ = A{B: B{}, b /* ERROR "" */ : 0}
_ = A{x /* ERROR "pointer indirection" */ : 0}
_ = B{b: 0, c: 0, x: 0, y: 0, z: 0}
_ = B{C: C{}, x /* ERROR "cannot specify promoted field x and enclosing embedded field C" */ : 0}
_ = A{b: 0, B /* ERROR "cannot specify embedded field B and enclosed promoted field b" */ : B{}}
+ _ = A{B: B{}, b /* ERROR "cannot specify promoted field b and enclosing embedded field B" */ : 0}
)
```
Change information
Commit message:
go/types, types2: allow promoted field names as keys in struct literals
For #9859.
Change-Id: Ie4823e726ab43fe2ce1e96c279f63dad6c1f9873
Files:
- M src/cmd/compile/internal/types2/literals.go
- M src/cmd/compile/internal/types2/lookup.go
- M src/go/types/literals.go
- M src/go/types/lookup.go
- M src/internal/types/testdata/check/expr3.go
- A src/internal/types/testdata/spec/structLits.go
- M test/fixedbugs/issue23609.go
- M test/fixedbugs/issue26416.go
Change size: M
Delta: 8 files changed, 144 insertions(+), 57 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Mark Freeman, +1 by Robert Griesemer
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI