CsWinRT icon indicating copy to clipboard operation
CsWinRT copied to clipboard

Suppress useless IL2080 warnings in fallback paths

Open Sergio0694 opened this issue 1 year ago • 0 comments

This PR suppresses a bunch of IL2080 warnings for MakeGenericCalls that we know are actually safe. The warnings come from the fact the ABI type arguments are passed to type parameters using the unmanaged constraint, which implies struct, which implies new(), which in turn implies [DynamicallyAccessedMemebrs(PublicParameterlessConstructor)]. Because we know that all our ABI types are just blittable and will never have a constructor, we can just safely suppress these warnings.

[!NOTE] I recommend reviewing this with whitespace hidden.

Sergio0694 avatar Feb 22 '24 23:02 Sergio0694