Repository navigation
Drop async modifier from abstract (bodyless) converted methods - #5
Closed
GrahamTheCoder wants to merge 1 commit into
Closed
GrahamTheCoder wants to merge 1 commit into
GrahamTheCoder wants to merge 1 commit into
Conversation
VB allows MustOverride Async Function; C# reports CS1994 for async on a method without a body. async is not part of the signature, so remove it when the converted method has no body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019FEr8FVAmHV9bscZ82CChg
Owner
Author
|
Superseded icsharpcode#1310 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes icsharpcode#1299
Summary
MustOverride Async Functionwas converted topublic abstract async Task ..., which gives CS1994. InDeclarationNodeVisitor, bodyless methods now have theasyncmodifier removed (WithoutAsyncModifier).asyncis not part of the signature, so overriding methods stayasync.Tests added
MustOverride Async SubandMustOverride Async Function ... As Task(Of Integer).asyncis kept on the implementing part, which C# permits.The first two were confirmed red for CS1994 before the fix and are green now.
Other bodyless cases considered
VB does not allow
Asyncon interface members or onDeclare, so those can't occur. The partial definition is not affected, since the VBasyncis on the implementation only.Status
The full suite was not run (usage limit reached). Only the filtered tests were run. Coverage was not collected, and there was no blind review round.
Next steps:
Generated by Claude Code