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

Tuple literal type covariance #1166

Closed
degory opened this issue Apr 11, 2024 · 0 comments · Fixed by #1175
Closed

Tuple literal type covariance #1166

degory opened this issue Apr 11, 2024 · 0 comments · Fixed by #1175

Comments

@degory
Copy link
Owner

degory commented Apr 11, 2024

Full covariance support for tuple types is awkward, because the underlying .NET Core tuple type is not covariant. However, we can support covariance when constructing tuple literals in a context where we know what element types are actually expected - for example in a return statement or expression function body, in an assignment statement or as a function actual argument.

degory added a commit that referenced this issue Apr 17, 2024
Enhancements:
- Tuple literal type covariance (closes #1166)
- Improved type inference for list literals and if expressions (see #1173)
degory added a commit that referenced this issue Apr 17, 2024
Enhancements:
- Tuple literal type covariance (closes #1166)
- Improved type inference for list literals and if expressions (see #1173)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant