We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69062fd commit d41c3dbCopy full SHA for d41c3db
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMethodBodyScanner.cs
@@ -656,6 +656,12 @@ public static bool HandleCall(
656
if (Intrinsics.GetIntrinsicIdForMethod(callingMethodDefinition) == IntrinsicId.RuntimeReflectionExtensions_GetMethodInfo)
657
break;
658
659
+ if (param.IsEmpty())
660
+ {
661
+ // The static value is unknown and the below `foreach` won't execute
662
+ reflectionMarker.Dependencies.Add(reflectionMarker.Factory.ReflectedDelegate(null), "Delegate.Method access on unknown delegate type");
663
+ }
664
+
665
foreach (var valueNode in param.AsEnumerable())
666
{
667
TypeDesc? staticType = (valueNode as IValueWithStaticType)?.StaticType?.Type;
0 commit comments