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
RUC on type silences warnings for code in members of the type, including generics warnings for methods.
But it doesn't silence warnings about generics on the type itself:
classRequireAll<[DAM(DAMT.All)]T>{}[RUC("C<T>")]classC<T>:RequireAll<T>{}// IL2091 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.All'
I believe RUC on type should silence this warning. I can't think of a way to do something unsafe with typeof(C<>) that wouldn't cause warnings elsewhere.
The text was updated successfully, but these errors were encountered:
classG<[DAM(DAMT.PublicMethods)]T>{}[RUC("")]classCInst<T>{publicstaticG<T>field;// IL2091publicG<T>instField;// IL2091}[RequiresUnreferencedCode("")]publicstaticvoid Test(){
var f =new CInst<int>().instField;
var g = CInst<int>.field;}
RUC on type silences warnings for code in members of the type, including generics warnings for methods.
But it doesn't silence warnings about generics on the type itself:
I believe RUC on type should silence this warning. I can't think of a way to do something unsafe with
typeof(C<>)
that wouldn't cause warnings elsewhere.The text was updated successfully, but these errors were encountered: