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

Update help service to account for all TypeDeclarationSyntax (namespace+record+struct) as partial type #48095

Merged
merged 5 commits into from
Sep 28, 2020

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Sep 27, 2020

Parallel to dotnet/docs#20798

@Youssef1313 Youssef1313 requested a review from a team as a code owner September 27, 2020 20:48
Comment on lines 287 to 288
else if (token.Parent.GetAncestorOrThis<ClassDeclarationSyntax>() != null ||
token.Parent.GetAncestorOrThis<RecordDeclarationSyntax>() != null)
Copy link
Member Author

Choose a reason for hiding this comment

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

@davidwengier Can we remove this else if altogether and assume "partialtype_CSharpKeyword" if SyntaxKind.PartialKeyword is found on non-MethodDeclarationSyntax.

Copy link
Member

Choose a reason for hiding this comment

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

what about structs/interfaces?

Copy link
Member Author

Choose a reason for hiding this comment

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

@CyrusNajmabadi I should have caught this from my docs PR 😄
I would prefer removing the else if part then, what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Seems like TypeDeclarationSyntax covers all bases

@Youssef1313 Youssef1313 changed the title Update help service to account for record as partial type Update help service to account for all TypeDeclarationSyntax (namespace+record+struct) as partial type Sep 27, 2020
@Youssef1313 Youssef1313 marked this pull request as draft September 27, 2020 22:21
@Youssef1313 Youssef1313 marked this pull request as ready for review September 27, 2020 22:21
@Youssef1313 Youssef1313 reopened this Sep 27, 2020
@jinujoseph jinujoseph added Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Sep 28, 2020
@davidwengier davidwengier merged commit 2366c3c into dotnet:master Sep 28, 2020
@ghost ghost added this to the Next milestone Sep 28, 2020
@davidwengier
Copy link
Member

Thanks!

333fred added a commit that referenced this pull request Sep 28, 2020
…features/interpolated-string-constants

* upstream/master: (1950 commits)
  Delete extra "Return True" (#48089)
  Remove unused param
  Extract local
  Update help service to account for all `TypeDeclarationSyntax` (namespace+record+struct) as partial type (#48095)
  Don't offer to remove as cast from using statements or declarations (#48110)
  Cleaner solution
  Update tests
  Don't offer to remove necessary native integer casts
  Fix xml attribute name classification
  Use switch expressions.
  Add test for IAsyncEnumerable<string>
  Fix tests
  Add tests
  Update CSharpTypeInferenceService.TypeInferrer.cs
  Fix failure to dispose RemoteWorkspace in tests
  [master] Update dependencies from dotnet/roslyn (#48072)
  Simplify common calls to Parallel.For with a RoslynParallel.For helper
  Fallback to IEnumerable<> if IAsyncEnumerable<> not found
  Fix cancellation handling in Parallel.For
  Update InferTypeInForEachStatement to respect await foreach
  ...
@Cosifne Cosifne modified the milestones: Next, 16.9.P1 Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants