Permalink
Browse files

2009-01-21 Mark Probst <mark.probst@gmail.com>

	* metadata.c (mono_metadata_generic_param_equal): Owner as well as
	image must match.

2009-01-21  Mark Probst  <mark.probst@gmail.com>

	* generic-unloading.2.cs, generic-unloading-sub.2.cs: Test case
	for unloading images whose MonoGenericInst's are still in use.

	* Makefile.am: Test added.

svn path=/trunk/mono/; revision=124022
  • Loading branch information...
1 parent b7fce89 commit 060d976f4c872e0dc97c9ba9928da9ea05beefe9 @schani schani committed Jan 21, 2009
View
@@ -1,5 +1,10 @@
2009-01-21 Mark Probst <mark.probst@gmail.com>
+ * metadata.c (mono_metadata_generic_param_equal): Owner as well as
+ image must match.
+
+2009-01-21 Mark Probst <mark.probst@gmail.com>
+
* reflection.c (resolve_object): For fields, inflate the class and
then get the field in the inflated class.
View
@@ -3988,7 +3988,7 @@ mono_metadata_generic_param_equal (MonoGenericParam *p1, MonoGenericParam *p2, g
if (p1->num != p2->num)
return FALSE;
- if (p1->owner == p2->owner)
+ if (p1->owner == p2->owner && p1->image == p2->image)
return TRUE;
/*
View
@@ -1,3 +1,10 @@
+2009-01-21 Mark Probst <mark.probst@gmail.com>
+
+ * generic-unloading.2.cs, generic-unloading-sub.2.cs: Test case
+ for unloading images whose MonoGenericInst's are still in use.
+
+ * Makefile.am: Test added.
+
2009-01-20 Mark Probst <mark.probst@gmail.com>
* generic-stack-traces.2.cs: Generic sharing test for stack
View
@@ -336,7 +336,9 @@ BASE_TEST_CS_SRC= \
bug-461261.cs \
bug-400716.cs \
bug-462592.cs \
- bug-459094.cs
+ bug-459094.cs \
+ generic-unloading.2.cs \
+ generic-unloading-sub.2.cs
if AMD64
TEST_CS_SRC = $(BASE_TEST_CS_SRC) async-exc-compilation.cs
@@ -0,0 +1,18 @@
+using System;
+
+public class Gen<A,B,C> {}
+
+public class main {
+ static object GenericFunc<A,B,C> () {
+ return new Gen<A,B,C> ();
+ }
+
+ static void DoGenericStuff () {
+ GenericFunc<object,object,object> ();
+ }
+
+ public static int Main () {
+ DoGenericStuff ();
+ return 0;
+ }
+}
@@ -0,0 +1,35 @@
+using System;
+
+public class Gen<A,B,C> {}
+
+public class main {
+ static object GenericFunc<A,B,C> () {
+ return new Gen<A,B,C> ();
+ }
+
+ static void DoGenericStuff () {
+ Console.WriteLine ("doing generic stuff");
+ GenericFunc<object,object,object> ();
+ }
+
+ static void DoOtherGenericStuff () {
+ Console.WriteLine ("doing other generic stuff");
+ GenericFunc<object,object,int> ();
+ }
+
+ public static void Main ()
+ {
+ // Create an Application Domain:
+ System.AppDomain newDomain = System.AppDomain.CreateDomain("NewApplicationDomain");
+
+ // Load and execute an assembly:
+ newDomain.ExecuteAssembly(@"generic-unloading-sub.2.exe");
+
+ DoGenericStuff ();
+
+ // Unload the application domain:
+ System.AppDomain.Unload(newDomain);
+
+ DoOtherGenericStuff ();
+ }
+}

0 comments on commit 060d976

Please sign in to comment.