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

Bug: Versioning not complaining about union of arrays using incomaptible types #3134

Closed
timotheeguerin opened this issue Apr 8, 2024 · 1 comment · Fixed by #4179
Closed
Assignees
Labels
bug Something isn't working triaged:core

Comments

@timotheeguerin
Copy link
Member

timotheeguerin commented Apr 8, 2024

If referencing a type via a union of array that is not available in the version it doesn't complain and we endup with some never types

model Widget {
  // uncomment to fix
  // @added(Versions.v2)
  content: string | Bar[];
}

@added(Versions.v2)
model Bar {}

Playground Link

@markcowl markcowl added the bug Something isn't working label Apr 15, 2024
@markcowl markcowl added this to the [2024] June milestone Apr 15, 2024
@tjprescott
Copy link
Member

tjprescott commented Apr 29, 2024

I think the right way to express this is in this playground using @typeChangedFrom.

So it seems to me like the course of action here would be to throw a versioning error that Bar is referenced in v1 but didn't exist until v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged:core
Projects
None yet
3 participants