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

enforce setting #60100

Closed
wants to merge 12 commits into from
Closed

enforce setting #60100

wants to merge 12 commits into from

Conversation

333fred
Copy link
Member

@333fred 333fred commented Mar 11, 2022

dotnet-bot and others added 12 commits December 18, 2021 16:02
…equired-members

Merge main to features/required-members
…equired-members

Merge main to features/required-members
…equired-members

Merge main to features/required-members
…equired-members

Merge main to features/required-members
Implements parsing for required members.

Test plan: dotnet#57046
Spec: dotnet/csharplang#3630
…58507)

Adding `required` to a member now results in the type having a `RequiredMemberAttribute` emitted on the member and the containing type. Reading this data from metadata is not yet supported, nor is adding the requisite `ObsoleteAttribute` to constructors that depend on such contracts. The rules for when required is allowed and when it is disallowed are documented in dotnet/csharplang#5566.

Test plan: dotnet#57046
Added support for reading the RequiredMemberAttribute from metadata appropriately and returning the right result for IsRequired and HasDeclaredRequiredMembers for metadata infos.
…ures/required-members

* upstream/main: (1291 commits)
  Revert "Make solution options global (dotnet#59168)" (dotnet#59537)
  Update src/VisualStudio/CSharp/Test/F1Help/F1HelpTests.cs
  Update src/VisualStudio/CSharp/Impl/LanguageService/CSharpHelpContextService.cs
  Update Language Feature Status.md (dotnet#59546)
  Catch more exceptions (dotnet#59526)
  Fix Peek Definition for Razor files (dotnet#59528)
  Update OneOffInsertion.ps1 path in 17.0 branch (dotnet#59541)
  Use GetBestTypeByMetadataName in 'use System.HashCode' fixer
  Pass exception into internal error diagnostic (dotnet#59443)
  Provide f1 help for discards
  Update src/VisualStudio/Core/Def/SymbolSearch/AbstractDelayStartedService.cs
  Fix formatting
  move line
  Simplify
  Simplify
  Fixup
  Explicitly perform some mef loads in teh background
  Bump Microsoft.DiaSymReader version for release
  Remove IBoundSwitchStatement (dotnet#59516)
  Make solution options global (dotnet#59168)
  ...
…equired-members

Merge main to features/required-members
…ures/required-members

* upstream/main: (187 commits)
  Add GlobalOptions.SetBackgroundAnalysisScope and PythiaGlobalOptions External Access API (dotnet#59794)
  Update source-build dependency to source-build-externals (dotnet#59549)
  Do not retry on Clipboard API for StackTraceExplorer (dotnet#59658)
  Remove unnecessary accesses on XML end tag (dotnet#59771)
  Threading
  lint
  Improve PDB source document project handling (dotnet#59643)
  Disable Auto-Open behavior for Stack Trace Explorer (dotnet#59785)
  REmove comment
  Push async up
  Simplify
  Remove stale remarks
  Update src/Tools/ExternalAccess/FSharp/Navigation/FSharpDocumentNavigationService.cs
  Remove unnecessary code
  Simplify threading
  Update tests
  Make the  IDocumentNavigationSerivice entirely async.
  Disable additional text comparer in generator driver (dotnet#59776)
  [LSP] Cache parsed xml snippets for razor (dotnet#59605)
  Make static
  ...
…equired-members

Merge main to features/required-members
Implements reading the required members list of a type, and enforces that required members are all set by an initializer on the constructor. Required members must be initialized with values, not with nested object initializers.

Test plan dotnet#57046.
Specification https://github.com/dotnet/csharplang/blob/main/proposals/required-members.md
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.

2 participants