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

Return null rather than this from INamedTypeSymbol.TupleUnderlyingType #41828

Merged
merged 2 commits into from
Feb 25, 2020

Conversation

cston
Copy link
Member

@cston cston commented Feb 20, 2020

Fixes #41702

INamedTypeSymbol.TupleUnderlyingType
@cston cston requested a review from a team as a code owner February 20, 2020 19:49
@cston cston changed the base branch from master to release/dev16.5 February 20, 2020 19:51
@cston cston added this to the 16.5 milestone Feb 20, 2020
@@ -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.
Copy link
Contributor

@AlekseyTs AlekseyTs Feb 20, 2020

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

Copy link
Member Author

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)

@AlekseyTs
Copy link
Contributor

AlekseyTs commented Feb 20, 2020

It looks like CI isn't passing. #Closed

@AlekseyTs
Copy link
Contributor

AlekseyTs commented Feb 20, 2020

Done with review pass (iteration 1) #Closed

Copy link
Member

@gafter gafter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@cston cston requested a review from a team as a code owner February 21, 2020 20:48
@@ -492,6 +491,11 @@ bool containsModopt(INamedTypeSymbol symbol)
}
}

private static INamedTypeSymbol GetTupleUnderlyingTypeOrSelf(INamedTypeSymbol type)
Copy link
Contributor

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.

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (iteration 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

INamedTypeSymbol.TupleUnderlyingType should return null rather than this
4 participants