Skip to content

Commit 6f9bc6b

Browse files
authored
[Mono.Android.Export] Fix DynamicDependency to JavaArray (dotnet#6105)
For awhile, we've been observing ILLink warnings: ILLink warning IL2036: Java.Interop.DynamicInvokeTypeInfo.ToNative(CodeExpression): Unresolved type 'Android.Runtime.JavaArray' in DynamicDependencyAttribute The cause is a "typo" in commit 15269f6, which added the `[DynamicDependency]` custom attributes to `DynamicInvokeTypeInfo.ToNative()`: commit 15269f6 specified the non-generic type `Android.Runtime.JavaArray`, which does not exist. Fix the `[DynamicDependency]` custom attribute value to instead mention ``Android.Runtime.JavaArray`1``, the type `JavaArray<T>`. This should fix the IL2036 warning.
1 parent 57636c8 commit 6f9bc6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mono.Android.Export/CallbackCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public CodeExpression FromNative (CodeExpression arg)
407407
}
408408

409409
// Ignore ToNative() overload that takes generic instancing mapping. The reflected method should have nothing to do with it.
410-
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaArray", "Mono.Android")]
410+
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaArray`1", "Mono.Android")]
411411
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaCollection", "Mono.Android")]
412412
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaCollection`1", "Mono.Android")]
413413
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaDictionary", "Mono.Android")]

0 commit comments

Comments
 (0)