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
Describe the bug I am aware about Arg,Do<TArg>(...) api, but I am curious why I see this analzyer warning:
Arg,Do<TArg>(...)
NS3005:Could not set argument.
This yields a warning:
But this does not:
To Reproduce
TimerCallback? cb = null; object? state = null; var timer = Substitute.For<ITimer>(); var timeProvider = Substitute.For<TimeProvider>(); timeProvider.CreateTimer(Arg.Any<TimerCallback>(), Arg.Any<object?>(), Arg.Any<TimeSpan>(), Arg.Any<TimeSpan>()) .Returns(timer) .AndDoes(ci => { cb = ci[0] as TimerCallback; state = ci[1]; });
Expected behaviour There should not any warning here.
Environment:
The text was updated successfully, but these errors were encountered:
Hi @voroninp ,
Thanks for raising this. I've transferred it to the Analyzers project which is detecting NS3005.
cc: @tpodolak
Sorry, something went wrong.
@voroninp thanks for reporting. It loosk like analyzer confues
state = ci[1];
with
c[1] = state
GH-223 - analyze callinfo assignment
d27e6b8
311f42f
Successfully merging a pull request may close this issue.
Describe the bug
I am aware about
Arg,Do<TArg>(...)
api, but I am curious why I see this analzyer warning:This yields a warning:
But this does not:
To Reproduce
Expected behaviour
There should not any warning here.
Environment:
The text was updated successfully, but these errors were encountered: