* FieldInfoTest.cs: Add a test for #525733.
svn path=/trunk/mcs/; revision=139055
+2009-07-30 Zoltan Varga <vargaz@gmail.com>
+
+ * FieldInfoTest.cs: Add a test for #525733.
+
2009-07-27 Rodrigo Kumpera <rkumpera@novell.com>
* AssemblyTest.cs: Add test for empty string passed to
Assert.IsNull (ex.ParamName, "#5");
}
}
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void GetFieldFromHandle2_Incompatible ()
+ {
+ RuntimeFieldHandle fh = typeof (FieldInfoTest<int>).GetField ("TestField").FieldHandle;
+
+ FieldInfoTest<string> instance = new FieldInfoTest<string> ();
+ Type t2 = instance.GetType ();
+ RuntimeTypeHandle th = t2.TypeHandle;
+
+ FieldInfo fi2 = FieldInfo.GetFieldFromHandle (fh, th);
+ }
#endif
[Test]