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

Creating named tuple type synonyms in using not allways allowed #58967

Closed
AlexeiScherbakov opened this issue Jan 20, 2022 · 1 comment
Closed
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@AlexeiScherbakov
Copy link

Version Used:
Microsoft Visual Studio Community 2019
Version 16.11.2
.NET Core SDK 5.0.400
Steps to Reproduce:

Create 2 files with using synonyms definition

This is working

using TreeKey = System.ValueTuple<string, string, string, string, string, string>;
using TreeKey2 = System.ValueTuple<(string a, string b, string c, string d, string e, string f)>;

This is not

using TreeKey = System.ValueTuple<string, string, string, string, string, string>;
using TreeKey2 = System.ValueTuple<(string a, string b, string c, string d, string e, string f)>;
using TreeKey3 = (string a, string b, string c, string d, string e, string f);

Expected Behavior:
Tuple synonym TreeKey3 must be allowed, because TreeKey2 synonym is allowed

Actual Behavior:
Tuple synonym TreeKey3 don't compile. Tuple synonym TreeKey2 which contains same(!) named tuple inside can be compiled. TreeKey & TreeKey3 are equivalent, but TreeKey3 contains syntax sugar.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 20, 2022
@CyrusNajmabadi
Copy link
Member

Language feature request tracked here: dotnet/csharplang#4284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants