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

Collection expressions need to work with nullable-value-target-types #69447

Closed
CyrusNajmabadi opened this issue Aug 9, 2023 · 0 comments · Fixed by #69852
Closed

Collection expressions need to work with nullable-value-target-types #69447

CyrusNajmabadi opened this issue Aug 9, 2023 · 0 comments · Fixed by #69852
Assignees
Labels
Milestone

Comments

@CyrusNajmabadi
Copy link
Member

CyrusNajmabadi commented Aug 9, 2023

Assigning to chuck pre-emptively so we don't miss this. If this already works (and has tests), great. If it doesn't, we need to make it work pre-launch:

ImmutableArray<int> a = [1, 2, 3];
ImmutableArray<int>? b = [1, 2, 3];
ImmutableArray<int?> c = [1, 2, 3];
ImmutableArray<int?>? d = [1, 2, 3];

This very strongly falls out from our correspondence with tuples. Specifically, all of the following work as expected:

(int, int) a = (1, 2);
(int, int)? b = (1, 2);
(int?, int?) c = (1, 2);
(int?, int?)? d = (1, 2);

Relates to test plan #66418

Spec update: dotnet/csharplang#7513

@CyrusNajmabadi CyrusNajmabadi added this to the 17.8 milestone Aug 9, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 9, 2023
@jcouv jcouv removed the untriaged Issues and PRs which have not yet been triaged by a lead label Aug 10, 2023
@jaredpar jaredpar assigned jcouv and unassigned cston Aug 31, 2023
@jcouv jcouv added 4 - In Review A fix for the issue is submitted for review. and removed 3 - Working labels Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants