[corlib] Update SafeHandle dispose pattern to match .net. Fixes #25132
[mono.git] / mcs / mcs / field.cs
index 3531af044f3bc39543000501a647a96f409e8b7a..824b5c781cd35c1ae8594baccd1240de36f31eda 100644 (file)
@@ -425,7 +425,7 @@ namespace Mono.CSharp
                        }
                        
                        // Create nested fixed buffer container
-                       string name = String.Format ("<{0}>__FixedBuffer{1}", Name, GlobalCounter++);
+                       string name = String.Format ("<{0}>__FixedBuffer{1}", TypeDefinition.FilterNestedName (Name), GlobalCounter++);
                        fixed_buffer_type = Parent.TypeBuilder.DefineNestedType (name,
                                TypeAttributes.NestedPublic | TypeAttributes.Sealed | TypeAttributes.BeforeFieldInit,
                                Compiler.BuiltinTypes.ValueType.GetMetaInfo ());