Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override parent values with a struct, extends its values. #167

Open
spinillos opened this issue Nov 23, 2023 · 0 comments
Open

Override parent values with a struct, extends its values. #167

spinillos opened this issue Nov 23, 2023 · 0 comments
Labels
area:parsers bug Something isn't working

Comments

@spinillos
Copy link
Member

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:parsers bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant