Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merge 'main' into RefStructInterfaces #73492

Merged

Conversation

AlekseyTs
Copy link
Contributor

No description provided.

jjonescz and others added 30 commits April 16, 2024 10:21
* 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
…otnet#73462)

When dynamically registering for razor, the didChange was registered incorrectly. This changes to make sure the change exist and uses incremental, which is what xaml registers as
* Add more "ref in async" tests

* Link langversion diagnostic mismatch issue in more tests

* Test inline array init with awaits
Cache internal objects used by the formatting engine.
@AlekseyTs AlekseyTs requested review from jjonescz and cston May 15, 2024 17:28
@AlekseyTs AlekseyTs requested review from a team as code owners May 15, 2024 17:28
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label May 15, 2024
@AlekseyTs
Copy link
Contributor Author

@cston, @jjonescz, @dotnet/roslyn-compiler Please review a merge from main, the last commit reflects non-trivial conflicts

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area-Compilers Feature - RefStructInterfaces untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants