You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ReferenceAssemblyAnnotator creates SocketAsyncEventArgs.Completed with a bizarre nullable event args parameter:
No diagnostic should be shown here. When compiling on net6.0, there is no diagnostic for this sample code.
I decompiled %userprofile\.nuget\packages\microsoft.netcore.app.ref\6.0.0\ref\net6.0\System.Net.Sockets.dll and confirmed that it has public event EventHandler<SocketAsyncEventArgs>? Completed;, not public event EventHandler<SocketAsyncEventArgs?>? Completed;.
Repro
usingSystem.Net.Sockets;varx=newSocketAsyncEventArgs();// ⚠️ CS8622 Nullability of reference types in type of parameter 'e' of 'void OnCompleted(object? sender,// SocketAsyncEventArgs e)' doesn't match the target delegate 'EventHandler<SocketAsyncEventArgs?>' (possibly// because of nullability attributes).// ↓↓↓↓↓↓↓↓↓↓↓x.Completed+=OnCompleted;voidOnCompleted(object?sender,SocketAsyncEventArgse){}
ReferenceAssemblyAnnotator creates SocketAsyncEventArgs.Completed with a bizarre nullable event args parameter:
No diagnostic should be shown here. When compiling on
net6.0
, there is no diagnostic for this sample code.I decompiled
%userprofile\.nuget\packages\microsoft.netcore.app.ref\6.0.0\ref\net6.0\System.Net.Sockets.dll
and confirmed that it haspublic event EventHandler<SocketAsyncEventArgs>? Completed;
, notpublic event EventHandler<SocketAsyncEventArgs?>? Completed;
.Repro
The text was updated successfully, but these errors were encountered: