Check out this sandbox
When declaring a struct that inherits from a different struct:
type Base struct {
a string
b string
}
type Something struct {
Base
c string
}
Then calling functions specifying values for the inherited values gives a compilation error:
f(Something{
a: "letter a",
c: "letter c",
})
The error message is: unknown Something field 'a' in struct literal
.
This seems highly weird to me. Is this really the intended functionality?
Thanks for the help!