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

Generate product types to contain fallback values for unions #54

Open
zliu41 opened this issue Apr 15, 2022 · 1 comment
Open

Generate product types to contain fallback values for unions #54

zliu41 opened this issue Apr 15, 2022 · 1 comment

Comments

@zliu41
Copy link
Member

zliu41 commented Apr 15, 2022

Supplying an additional input value to use in the case that the value to be converted from arrays is a non-finite floating-point value gets tricky with unions; we must have a product type that contains a constructor corresponding to each constructor available in the union, because we don't know which constructor we will be in at runtime.

ACs:

  • Automatically generate type definitions for products dual to unions that are defined in kitty protos

  • Automatically generate the corresponding non-finite fallback type hierarchy including these products in place of their unions

(Extricated from https://kitty-hawk.atlassian.net/browse/SW-5707)

@zliu41
Copy link
Member Author

zliu41 commented Apr 15, 2022

Greg Pfeil
January 7, 2022, 3:48 PM

Peddie’s parting words on this are that it’s not currently necessary, but would be if we ever have a sum type that has floating point values on more than one alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant