Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Consider relaxing restrictions of async methods in blocks that do not contain await. (VS 17.11, .NET 9) #1331

Copy link
Copy link
@VSadov

Description

@VSadov
Issue body actions

Async methods have several restrictions such as not allowing ref and ref-like/span locals.

The reason is the technical difficulties that may arise if such locals need to be hoisted. In a code that tries to mix await and span this could be inconvenient.

Besides there can be patterns which are obviously safe - In particular, in a block that does not contain await expressions, such locals would never be hoisted and therefore we could relax the restrictions.

svick, Unknown6656, MkazemAkhgary, geoffkizer, fubar-coder and 43 morejnm2, elgonzo, luizfernandonb and pCYSl5EDgo

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.