odd indentation behavior in nested anonymous type

For some strange reason when I have nested object intializers it always gets the next to last '}' wrong when I do code cleanup. It is not indented at all as shown in the following example:

 namespace MyNameSpace
{
     internal static class MyClass
     {
         static MyClass()
         {
             var bla = new Bla { Name = "Bla" };
             bla.Blub = new Blub
             {
                  Name = "Blub",
                  Blap = new Blap { Name = "Blap", Visible = true },
                  Blob = new Blob { Name = "Blob" },
                  Blib = new Blib
                 {
                       Blep = new Heater { Name = "Bleb" },
                       Id = 1,
                       Blap = new Blap { Name = "Blap" }
} // <—- wrong !!!
                 };
            }
       }
}


Could it be that there is something wrong in my settings? I have attached the whole JetBrains/Reshaprer/v5.0/vs10.0 directory. I have also installed Sylecop for Resharper. Visual Studio is setup to use tabs for indentation.



Attachment(s):
vs10.0.rar.zip
1 comment
Comment actions Permalink

I have the same type of behavior in collection initializers. Annoying because I frequently edit the content and if you enter the closing curly brackets, then it suddenly reformats the whole inline tree and starts messing up the indentations, so that stuff no longer lines up.

0

Please sign in to leave a comment.