-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Merge "ref in async" feature into main #73488
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Warn for `yield return` in `lock` * Encapsulate utility for filtering diagnostics * Filter warning for `yield return` in the new `lock` * Test `yield` in `lock` * Update existing test * Revert "Filter warning for `yield return` in the new `lock`" This reverts commit eafc594. * Revert "Encapsulate utility for filtering diagnostics" This reverts commit 654d458. * Add a comment separating error and warning conditions * Update tests after removing warning filtering * Remove runtime-dependent output verification * Remove unused code from a test
* Allow ref-like locals in iterators and async methods * Return check of ref-like locals in async methods * Move declaration to block where it's used * Add todo for improving error message of ERR_SpecialByRefInLambda * Test `ref` in `await foreach` and iterator * Extend tests * Skip incompatible desktop tests * Test `yield break` in the new `lock` * Extend tests * Mark removed unreleased error code as available * Improve check for ref locals that can be hoisted * Return error `ERR_BadSpecialByRefIterator` * Extend tests * Uncapitalize feature name to be like others * Use better errors for refs across awaits * Improve errors for spilled ref locals across awaits * Replace remaining old error messages * Return wrongly removed fact condition * Extend tests * Report errors close to problematic usage where possible * Add more tests * Test foreach on ref local with iterator inside * Report spill local await boundary errors at their declaration * Revert accidentally changed test name * Test ref struct Current of async enumerator
* Allow unsafe blocks in iterators * Drop duplicate long diagnostic verifications * Use `nint` in tests to simplify * Add more tests * Handle more iterator kinds * Make unsafe affect only signature, not iterator body * Fix comments * Rename method setting or clearing unsafe region * Improve code * Fix accessors * Remove asserts that can fail for invalid code * Improve tests * Avoid some langversion errors that would still be errors in newer langversions * Refactor tests * Document a breaking change * Fix theory conditions * Test non-iterator unsafe contexts in older language versions as well * Fix tests demonstrating unsafe context in iterators in C# 12 * Improve naming of tests verifying safe context of setters * Clarify comment * Fix test name
* Add more "ref in async" tests * Link langversion diagnostic mismatch issue in more tests * Test inline array init with awaits
dotnet-issue-labeler
bot
added
Area-Compilers
untriaged
Issues and PRs which have not yet been triaged by a lead
labels
May 15, 2024
AlekseyTs
approved these changes
May 15, 2024
This was referenced May 18, 2024
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-Compilers
Feature - Ref/Unsafe in Iterators/Async
untriaged
Issues and PRs which have not yet been triaged by a lead
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Includes a merge from main into the feature branch (the last commit) with trivial merge conflicts only (in ErrorFacts.cs).
Note: I've also successfully built runtime (
clr+libs+libs.tests
) with this version of Roslyn locally.