-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Describe the bug
In the C# 7.x draft, §C.3 (Standard Library Types not defined in ISO/IEC 23271), AsyncMethodBuilderAttribute has AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Method
. Of these, AttributeTargets.Method is not needed for C# 7.3 and instead corresponds to a C# 10 feature.
Example
This should not be allowed in a C# 7.3 implementation without extensions.
using System.Runtime.CompilerServices;
public class C {
[AsyncMethodBuilder(typeof(C))]
void M() {}
}
Expected behavior
In §C.3, remove AttributeTargets.Method from AsyncMethodBuilderAttribute.
Additional context
The C# 7.0 Async Task Types in C# proposal does not mention AttributeTargets.
dotnet/runtime#50116 added AttributeTargets.Method to AsyncMethodBuilderAttribute, for the C# 10 AsyncMethodBuilder override proposal dotnet/csharplang#1407.