-
Notifications
You must be signed in to change notification settings - Fork 4k
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
INamedTypeSymbol.Arity incorrectly reports zero for ValueTuple<int, int> in VB #20648
Comments
At one time the implementation of tuples recognized that tuples and their underlying types are distinct types. Later, the LDM decided that these should not be distinct types. We (mostly) modified the compiler’s language behavior to respect the LDM decision, but we have not modified the APIs accordingly. Our compiler guidelines include this design point:
In order to align our APIs with the language view for tuples, I propose to make the following changes:
Some interesting effects are on long tuples.
In C# 6 and prior, a constructed type always had the same number of members as the type it was constructed from. This is no longer the case in C# 7, as long tuple types have additional members that are not members of the type from which they are constructed (e.g. |
@dotnet/roslyn-compiler This is a description of the set of changes we discussed today. |
Per LDM decisions on 2018-11-05, the following additional changes should be made:
|
Re-opened to track remaining work for VB (yet unscheduled, per discussion with Jared) |
Fixes dotnet#27322 (C# only) VB fix depends on dotnet#20648
@jcouv This issue is supposed to be done for C# and still open only for VB right? It's currently referenced in C# compiler source:
|
The compiler APIs incorrectly report that the type
ValueTuple<int, int>
is nongeneric (has no type arguments or type parameters).The text was updated successfully, but these errors were encountered: