diff --git a/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs b/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs index dfe4357ec5..f8cbf02593 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs @@ -122,7 +122,7 @@ namespace ICSharpCode.NRefactory.CSharp } foreach (var child in curNode.Children) { if (!(child is Statement || child is Expression) && - (child.Role != Roles.TypeMemberRole || (child is TypeDeclaration && includeInnerTypes))) + (child.Role != Roles.TypeMemberRole || ((child is TypeDeclaration || child is DelegateDeclaration) && includeInnerTypes))) nodeStack.Push (child); } }