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

Minor refactoring in 'required' handling for override completion #62422

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

Youssef1313
Copy link
Member

No description provided.

@Youssef1313 Youssef1313 requested a review from a team as a code owner July 6, 2022 13:29
@ghost ghost added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Jul 6, 2022
Comment on lines -412 to -415
// The user can add required if they want, but if the property being overridden is required, this one needs to be as well.
modifiers = modifiers.WithIsRequired(overriddenProperty.IsIndexer
? false
: (modifiers.IsRequired || overriddenProperty.IsRequired));
Copy link
Member Author

@Youssef1313 Youssef1313 Jul 6, 2022

Choose a reason for hiding this comment

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

The indexer part is now done in CodeGenerationPropertySymbol, and the required modifier now no longer needs to be special cased here. It'll flow automatically from GetOverrideModifiers. If new modifiers are added in the future, they can just flow automatically via GetOverrideModifiers as well, instead of keeping special cases

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge (squash) July 6, 2022 14:42
@CyrusNajmabadi
Copy link
Member

Thyanks!

@CyrusNajmabadi CyrusNajmabadi merged commit 9cbb21d into dotnet:main Jul 6, 2022
@ghost ghost added this to the Next milestone Jul 6, 2022
@Youssef1313 Youssef1313 deleted the required-ide-refactor branch July 6, 2022 15:13
333fred added a commit to 333fred/roslyn that referenced this pull request Jul 7, 2022
* upstream/main: (62 commits)
  Prevent assert from being hit (dotnet#62366)
  Don't offer '??=' for pointer types (dotnet#62476)
  Integrate generator times into /reportAnalyzer (dotnet#61661)
  Switch to a callback for cleaning up resources instead of passing in an explicit IDisposable. (dotnet#62373)
  Filter trees to only those containing global-usings or attributes prior to analyzing them. (dotnet#62444)
  Update PublishData.json
  Complete 'file' support for `SyntaxGenerator` (dotnet#62413)
  Apply changes directly to text buffer (dotnet#62337)
  Remove LangVer check from extended nameof binding (dotnet#62339)
  Fixed shared project file error (dotnet#62466)
  Handle new error codes
  Use MSBuid generated property for package path
  Exclude BCL libraries from Roslyn vsix
  Bump the integration test timeouts a bit
  Skip the balanced switch dispatch optimization for patterns on floating-point inputs (dotnet#62322)
  Test helpers shouldn't escape quotes by default (dotnet#62321)
  Reuse prior TableEntry values in the increment NodeTable builder if possible. (dotnet#62320)
  Install 3.1 runtime for SBOM tool
  Generate VS SBOM during official build.
  Minor refactoring in 'required' handling for override completion (dotnet#62422)
  ...
@allisonchou allisonchou modified the milestones: Next, 17.4 P1 Jul 26, 2022
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.

3 participants