Author: jbevain
Date: 2006-11-30 14:39:03 -0500 (Thu, 30 Nov 2006)
New Revision: 68771
Modified:
trunk/cecil/merge/ChangeLog
trunk/cecil/merge/Mono.Merge/ReflectionMerger.cs
Log:
2006-11-30 Jb Evain <[EMAIL PROTECTED]>
* Mono.Merge/ReflectionMerger.cs:
Fix a bug in merging nested nested types.
Modified: trunk/cecil/merge/ChangeLog
===================================================================
--- trunk/cecil/merge/ChangeLog 2006-11-30 19:38:31 UTC (rev 68770)
+++ trunk/cecil/merge/ChangeLog 2006-11-30 19:39:03 UTC (rev 68771)
@@ -1,3 +1,8 @@
+2006-11-30 Jb Evain <[EMAIL PROTECTED]>
+
+ * Mono.Merge/ReflectionMerger.cs:
+ Fix a bug in merging nested nested types.
+
2006-11-06 Jb Evain <[EMAIL PROTECTED]>
* Makefile, monomerge.exe.sources:
Modified: trunk/cecil/merge/Mono.Merge/ReflectionMerger.cs
===================================================================
--- trunk/cecil/merge/Mono.Merge/ReflectionMerger.cs 2006-11-30 19:38:31 UTC
(rev 68770)
+++ trunk/cecil/merge/Mono.Merge/ReflectionMerger.cs 2006-11-30 19:39:03 UTC
(rev 68771)
@@ -45,15 +45,17 @@
public override void VisitTypeDefinition (TypeDefinition type)
{
- if (!Target.MainModule.Types.Contains (type) &&
type.DeclaringType == null) {
- //not nested
- TypeDefinition td = type.Clone ();
- Target.MainModule.Types.Add (td);
- foreach (TypeDefinition nested in
td.NestedTypes)
- Target.MainModule.Types.Add (nested);
- }
+ if (!Target.MainModule.Types.Contains (type) &&
type.DeclaringType == null)
+ AddTypeDefinition (type.Clone ());
}
+ void AddTypeDefinition (TypeDefinition type)
+ {
+ Target.MainModule.Types.Add (type);
+ foreach (TypeDefinition nested in type.NestedTypes)
+ AddTypeDefinition (nested);
+ }
+
public override void VisitTypeReferenceCollection
(TypeReferenceCollection refs)
{
foreach (TypeReference tr in refs) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches