We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-13.0/ref-unsafe-in-iterators-async.md Feature branch: https://github.com/dotnet/roslyn/tree/features/RefInAsync Label: New Feature - Ref/Unsafe in Iterators/Async
unsafe
ref
ref struct
async
await
yield return;
yield break;
async foreach
yield
get
async Task<int[]> M() => ... ReadOnlySpan<int> x = await M();
Buffer2<int> b = [await a, await b]; // inline array type (ref struct)
using (refStruct = ...) { await ...; }
foreach (var _ in refStruct) { await ...; }
lock
Lock
Related:
The text was updated successfully, but these errors were encountered:
yield return
jjonescz
Successfully merging a pull request may close this issue.
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-13.0/ref-unsafe-in-iterators-async.md
Feature branch: https://github.com/dotnet/roslyn/tree/features/RefInAsync
Label: New Feature - Ref/Unsafe in Iterators/Async
unsafe
context within iterators is documentedref
/ref struct
local inasync
methodunsafe
block is allowed in C# 13 inasync
method (this is a preserved legacy behavior)unsafe
modifier is allowed on an iterator in C# 13, still an error (a language version error) in previous versionsunsafe
context within iterator's body (the breaking change)ref
/ref struct
localawait
yield return;
inasync
iteratorsyield break;
inasync
iteratorsasync foreach
blockyield
in nested blockasync
lambda / local functionget
iteratorasync
/ iterator even inunsafe
contextasync Task<int[]> M() => ... ReadOnlySpan<int> x = await M();
is expected to workBuffer2<int> b = [await a, await b]; // inline array type (ref struct)
using (refStruct = ...) { await ...; }
foreach (var _ in refStruct) { await ...; }
unsafe
contextunsafe
containing typeunsafe
iterator method declarationunsafe
iterator blockunsafe
local functionunsafe
propertyunsafe
property / indexerget
iteratorunsafe
contextawait
(confirm we have a legacy test)yield return;
yield break;
lock
yield return;
for legacy lockyield return;
forLock
typeyield break;
async
method (C#12 warning wave)async
/iteratorRelated:
await
. (VS 17.11, .NET 9) csharplang#1331The text was updated successfully, but these errors were encountered: