We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be76968 commit 8fbfb32Copy full SHA for 8fbfb32
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RootingHelpers.cs
@@ -227,6 +227,16 @@ public static bool TryGetDependenciesForReflectedField(ref DependencyList depend
227
((MetadataType)owningType).MakeInstantiatedType(inst));
228
}
229
230
+ try
231
+ {
232
+ // Make sure we're not putting something into the graph that will crash later.
233
+ factory.TypeSystemContext.EnsureLoadableType(field.FieldType);
234
+ }
235
+ catch (TypeSystemException)
236
237
+ return false;
238
239
+
240
dependencies.Add(factory.ReflectedField(field), reason);
241
242
return true;
0 commit comments