Conversation
@microsoft-github-policy-service agree |
|
On further thinking; would it not be better to be strict here, ensuring the method is a strict match or strict match + cancellationToken? The current code will match, regardless of my change or not void Bar(int i1) {}
Task BarAsync(int i1, int i2, int i3, int i4) => Task.CompletedTaskOnly matching same arguments + optional cancellation token: void Bar(int i1) {}
Task BarAsync(int i1, int i2, int i3, int i4) => Task.CompletedTask
Task BarAsync(int i1) => Task.CompletedTask // Match
Task BarAsync(int i1, CancellationToken t) => Task.CompletedTask // Match |
It's a good question. But I am leaning toward encouraging users to switch to the async method and passing more arguments if necessary. If we get more feedback of concrete cases where that's not the right fix, then we can reevaluate. |
|
Thanks for reporting the bug and contributing the fix. |
|
I resolved conflicts with your PR, but despite GitHub saying I have permission to push back to your source branch, git is telling me that I don't. Would you like to resolve the conflicts and push an update to the PR so that we can merge this? |
Fixes bug raised here: #1422
The method of HasSupersetOfParameterTypes confused me as I think the check was inverted?
I took the liberty to change that as well, but let me know if I understand it wrong.
Any and all feedback is appreciated