diff --git a/ICSharpCode.Decompiler/Ast/AstBuilder.cs b/ICSharpCode.Decompiler/Ast/AstBuilder.cs index a4e2419f6..bf647b379 100644 --- a/ICSharpCode.Decompiler/Ast/AstBuilder.cs +++ b/ICSharpCode.Decompiler/Ast/AstBuilder.cs @@ -949,7 +949,6 @@ namespace ICSharpCode.Decompiler.Ast IndexerDeclaration ConvertPropertyToIndexer(PropertyDeclaration astProp, PropertyDefinition propDef) { var astIndexer = new IndexerDeclaration(); - astIndexer.Name = astProp.Name; astIndexer.CopyAnnotationsFrom(astProp); astProp.Attributes.MoveTo(astIndexer.Attributes); astIndexer.Modifiers = astProp.Modifiers; diff --git a/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs b/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs index cfc0e4953..26bd784e2 100644 --- a/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs +++ b/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs @@ -282,6 +282,9 @@ namespace ICSharpCode.Decompiler.Ast nodeStack.Push(node); startLocations.Push(output.Location); + if (node is AttributedNode && node.GetChildByRole(AstNode.Roles.Identifier).IsNull) + output.WriteDefinition("", node.Annotation(), false); + MemberMapping mapping = node.Annotation(); if (mapping != null) { parentMemberMappings.Push(currentMemberMapping);