2008-10-14 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / statement.cs
index 928c687d77192ecb8291fd1e256eb8bc620541ae..f3480c06ed1ee4676fcb784fa98a9685e2f05c1f 100644 (file)
@@ -2346,6 +2346,11 @@ namespace Mono.CSharp {
                {
                        MutateVariables (storey);
 
+                       if (scope_initializers != null) {
+                               foreach (Statement s in scope_initializers)
+                                       s.MutateHoistedGenericType (storey);
+                       }
+
                        foreach (Statement s in statements)
                                s.MutateHoistedGenericType (storey);
                }
@@ -3664,7 +3669,7 @@ namespace Mono.CSharp {
 #endif
                        Field field = new Field (ec.TypeContainer, string_dictionary_type,
                                Modifiers.STATIC | Modifiers.PRIVATE | Modifiers.COMPILER_GENERATED,
-                               CompilerGeneratedClass.MakeName (null, "f", "switch$map", unique_counter++), null, loc);
+                               new MemberName (CompilerGeneratedClass.MakeName (null, "f", "switch$map", unique_counter++), loc), null);
                        if (!field.Define ())
                                return;
                        ec.TypeContainer.PartialContainer.AddField (field);