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
[ObjCRuntime] Enable nullability and clean up Stret.
This is file 3 of 7 files with nullability disabled in ObjCRuntime.
* Enable nullability (#nullable enable).
* Add null argument validation for stret helpers to improve static analysis and runtime diagnostics.
* Add nullable-safe handling for reflection-based attributes and ByValArray element types.
* Improve XML documentation comments by adding missing public API docs.
Contributes towards #17285.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
// IL2070: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields', 'DynamicallyAccessedMemberTypes.NonPublicFields' in call to 'System.Type.GetFields(BindingFlags)'. The parameter 'type' of method 'ObjCRuntime.Stret.GetValueTypeSize(Type, List<Type>, Boolean, Object)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
50
58
[UnconditionalSuppressMessage("","IL2070",Justification="Computing the size of a struct is safe, because the trimmer can't remove fields that would affect the size of a marshallable struct (it could affect marshalling behavior).")]
@@ -150,8 +168,15 @@ internal static bool IsBuiltInType (Type type, out int type_size)
150
168
151
169
// IL2070: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields', 'DynamicallyAccessedMemberTypes.NonPublicFields' in call to 'System.Type.GetFields(BindingFlags)'. The parameter 'type' of method 'ObjCRuntime.Stret.GetValueTypeSize(Type, Type, List<Type>, Boolean, Int32&, Int32&, Object)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
152
170
[UnconditionalSuppressMessage("","IL2070",Justification="Computing the size of a struct is safe, because the trimmer can't remove fields that would affect the size of a marshallable struct (it could affect marshalling behavior).")]
0 commit comments