-
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
Return null
rather than this
from INamedTypeSymbol.TupleUnderlyingType
#41828
Conversation
INamedTypeSymbol.TupleUnderlyingType
@@ -167,7 +167,7 @@ public interface INamedTypeSymbol : ITypeSymbol | |||
bool MightContainExtensionMethods { get; } | |||
|
|||
/// <summary> | |||
/// If this is a tuple type symbol, returns the symbol for its underlying type (ie. without element names). | |||
/// If this is a tuple type with element names, returns the symbol for the tuple type without names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a tuple type with element names, returns the symbol for the tuple type without names. [](start = 12, length = 96)
Is this accurate for long tuples? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should be correct for long tuples as well.
In reply to: 382318717 [](ancestors = 382318717)
It looks like CI isn't passing. #Closed |
Done with review pass (iteration 1) #Closed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -492,6 +491,11 @@ bool containsModopt(INamedTypeSymbol symbol) | |||
} | |||
} | |||
|
|||
private static INamedTypeSymbol GetTupleUnderlyingTypeOrSelf(INamedTypeSymbol type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static INamedTypeSymbol GetTupleUnderlyingTypeOrSelf(INamedTypeSymbol type) [](start = 8, length = 83)
It feels like we should be able to share this helper between compilers by adding it to ITypeSymbolHelpers type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (iteration 2)
Fixes #41702