Relax CS4012 on ROS with the scoped keyword
#6786
Answered
by
svick
RenderMichael
asked this question in
Language Ideas
-
|
Currently, the line async void MyMethod()
{
ReadOnlySpan<char> sessionId = "myString".AsSpan();
}throws a compiler error I propose that this be relaxed with the async void MyMethod()
{
scoped ReadOnlySpan<char> sessionId = "myString".AsSpan();
} |
Beta Was this translation helpful? Give feedback.
Answered by
svick
Dec 8, 2022
Replies: 1 comment 1 reply
-
|
It's not clear to me what is the proposed behavior when it comes to crossing |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
333fred
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not clear to me what is the proposed behavior when it comes to crossing
awaits or what is the reason for thescopedkeyword, but this looks like a duplicate of #4687.