-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
LanguageChangeSuggested changes to the Go languageSuggested changes to the Go languageLanguageChangeReviewDiscussed by language change review committeeDiscussed by language change review committeeProposal
Milestone
Description
(Status: referred from LanguageChange to Proposal. --adonovan)
Consider
type E struct {
A int
}
type T struct {
E
}
This works:
T{E: E{A: 1}}
This does not:
T{A: 1}
Makes some struct literals more verbose than they need be, and makes them asymmetrical to their usage (where you can access the embedded struct's fields directly).
Can we allow it?
(cc @bradfitz)
navytux, DeedleFake, dsnet, cezarsa, ghasemloo and 164 moretooolboxEwenQuim, woswos, Inuart, davidgubler, bgtill and 6 moresaffage
Metadata
Metadata
Assignees
Labels
LanguageChangeSuggested changes to the Go languageSuggested changes to the Go languageLanguageChangeReviewDiscussed by language change review committeeDiscussed by language change review committeeProposal
Type
Projects
Status
Active