if (!image)
image = mono_defaults.corlib;
+ if (!rootimage)
+ rootimage = mono_defaults.corlib;
+
if (ignorecase) {
MonoError error;
klass = mono_class_from_name_case_checked (image, info->name_space, info->name, &error);
--- /dev/null
+using System;
+
+class Program
+{
+
+ static void MissingImage ()
+ {
+ Type good = System.Type.GetType("System.Nullable`1[[System.Int32, mscorlib]]");
+ Type bad = System.Type.GetType("System.Nullable`1[[System.Int32, mscorlibBAD]]");
+
+ if (good.Assembly.FullName.Split (',') [0] != "mscorlib")
+ throw new Exception ("Wrong assembly name");
+
+ if (bad != null)
+ throw new Exception ("Should not have loaded type");
+ }
+
+ static void ProbeCorlib ()
+ {
+ Type good = System.Type.GetType("System.Nullable`1[[System.Int32, mscorlib]]");
+ Type bad = System.Type.GetType("System.Nullable`1[[System.IO.Pipes.PipeOptions, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]");
+
+ if (good.Assembly.FullName.Split (',') [0] != "mscorlib")
+ throw new Exception ("Wrong assembly name");
+
+ if (good == null || bad == null)
+ throw new Exception ("Missing image did not probe corlib");
+ }
+
+ static void Main()
+ {
+ MissingImage ();
+ ProbeCorlib ();
+ }
+}