Uh oh!
There was an error while loading. Please reload this page.
Fix super set for VSTHRD103 - #1423
Conversation
Tobbeman
commented
Feb 23, 2025
@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 voidBar(inti1){}TaskBarAsync(inti1,inti2,inti3,inti4)=>Task.CompletedTaskOnly matching same arguments + optional cancellation token: voidBar(inti1){}TaskBarAsync(inti1,inti2,inti3,inti4)=>Task.CompletedTaskTask BarAsync(inti1)=>Task.CompletedTask// MatchTask BarAsync(inti1,CancellationTokent)=>Task.CompletedTask// Match |
Andrew Arnott (AArnott)
commented
Jun 20, 2025
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. |
Andrew Arnott (AArnott)
commented
Jun 20, 2025
Thanks for reporting the bug and contributing the fix. |
Andrew Arnott (AArnott)
commented
Jun 20, 2025
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