Do not initialize (and mark) nested types if they were not already marked. Avoid...
authorSebastien Pouliot <sebastien@xamarin.com>
Tue, 19 Feb 2013 19:27:29 +0000 (14:27 -0500)
committerSebastien Pouliot <sebastien@xamarin.com>
Tue, 19 Feb 2013 20:30:22 +0000 (15:30 -0500)
mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs

index e9c34e0001ef45f8165c4c933c3c8bb9df8ca61e..804d9d6c7363eb2afe4bd49ee07aa3f958d48acf 100644 (file)
@@ -86,9 +86,12 @@ namespace Mono.Linker.Steps {
                        if (type.HasMethods)
                                InitializeMethods (type.Methods);
 
-                       if (type.HasNestedTypes)
-                               foreach (var nested in type.NestedTypes)
-                                       InitializeType (nested);
+                       if (type.HasNestedTypes) {
+                               foreach (var nested in type.NestedTypes) {
+                                       if (Annotations.IsMarked (nested))
+                                               InitializeType (nested);
+                               }
+                       }
                }
 
                void InitializeFields (TypeDefinition type)