Skip to content

Sourcebuild 7.0: scoped ref for latest Roslyn#8018

Merged
Forgind merged 1 commit intodotnet:mainfrom
rainersigwald:8014-scoped-ref-in-stringtools
Sep 30, 2022
Merged

Sourcebuild 7.0: scoped ref for latest Roslyn#8018
Forgind merged 1 commit intodotnet:mainfrom
rainersigwald:8014-scoped-ref-in-stringtools

Conversation

@rainersigwald
Copy link
Copy Markdown
Member

This change is required because of new C# features interacting with ref captures.

Per @jaredpar:

How ref capture works is a core problem we've been struggling with in the ref field design. The initial design went too far into the "let everything be captured" space, that lead to a number of compat breaks so we tweaked on aspect severely in the other direction, and after more refinement ended up in a more explainable place. Essentially any ref can be captured in the return of the method or out parameters. In this case it's a ctor, it has a ref so that can be captured but you don't intend that here so scoped to tell us it can't happen.

This is required to remove a 7.0 sourcebuild patch.

Backport: dotnet/installer#14616

Co-Authored-By: Jared Parsons <jaredpar@microsoft.com>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>true</IsPackable>
<GenerateReferenceAssemblySource>true</GenerateReferenceAssemblySource>
<LangVersion>8.0</LangVersion>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Finally leaving the 2019's? 😄

@Forgind Forgind merged commit 70db3ac into dotnet:main Sep 30, 2022
@rainersigwald rainersigwald deleted the 8014-scoped-ref-in-stringtools branch October 4, 2022 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants