-
Notifications
You must be signed in to change notification settings - Fork 465
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
RS0042 incorrectly firing for ref usage #7128
Comments
That helper method exists for the sole purpose of avoiding diagnostics. Can you provide a more complete example showing how the error was observed? |
The error was fired for that exact method. The |
Weird. So far I have not been able to reproduce this. |
Looks like dotnet/runtime#89736 changed the signature of Unsafe.AsRef to a form that isn't supported by the analyzer. Should be an easy fix. |
That explains the timing of why I just started getting the analyzer failure. |
…py value) Related to dotnet#7128
Consider the following code in roslyn
This code is not copying a
TemporaryArray<T>
but just downgrading ain
to aref
. This is firing RS0042 which seems incorrect though because there is no copy of the value here, just a change of the ref kind.The text was updated successfully, but these errors were encountered: