cog
cog copied to clipboard
Override parent values with a struct, extends its values.
When we have a struct that extend from another one and it overrides one of its fields with another struct, it extends its fields instead of used the new value. It happens in Go and TS.
Given:
#Base: {
field: string,
any?: _
}
#Struct: {
Base
any?: #Any
}
#Any: {
val: string
}
Generates:
type Struct struct {
...
any: *struct{
val string
}
}
Expectation:
type Struct struct {
...
any: *Any
}