Skip to content

Commit 72b47e7

Browse files
[Mono.Android] Suppress IL2068 on ManagedTypeManager.GetTypeForSimpleReference
The Java.Interop bump (external/Java.Interop -> 6820a9cb) shifted the trim-analysis warning on `ManagedTypeManager.GetTypeForSimpleReference`: its return value flows from the un-annotated `out` parameter of `ManagedTypeMapping.TryGetType (string, out Type)`, so it no longer satisfies the method's `[return: DynamicallyAccessedMembers]` and the trimmer now reports IL2068 (previously IL2063). This unsuppressed warning inflates the trim warning count and breaks the `BuildHasTrimmerWarnings` expectations. Mirror the existing IL2063 suppression on the sibling `TrimmableTypeMapTypeManager.GetTypeForSimpleReference`. `ManagedTypeManager` is removed in #11643. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d5ee2b3 commit 72b47e7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/Mono.Android/Microsoft.Android.Runtime/ManagedTypeManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ protected override IEnumerable<Type> GetTypesForSimpleReference (string jniSimpl
143143
}
144144
}
145145

146+
[UnconditionalSuppressMessage ("Trimming", "IL2068", Justification = "Temporary suppression until ManagedTypeMapping type entries carry DAM annotations.")]
146147
[return: DynamicallyAccessedMembers (MethodsConstructors)]
147148
protected override Type? GetTypeForSimpleReference (string jniSimpleReference)
148149
{

0 commit comments

Comments
 (0)