Permalink
Browse files

fix bug in remove braces action.

  • Loading branch information...
1 parent 3ba9118 commit c15615db826133587331ed70e9339f834a8cbebc @mkrueger mkrueger committed Jul 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ICSharpCode.NRefactory/CSharp/Refactoring/ContextAction/RemoveBraces.cs
@@ -51,7 +51,7 @@ static BlockStatement GetBlockStatement (RefactoringContext context)
var block = context.GetNode<BlockStatement> ();
if (block == null || block.LBraceToken.IsNull || block.RBraceToken.IsNull)
return null;
- if (block.Parent.Role == TypeDeclaration.MemberRole)
+ if (!(block.Parent is Statement))
return null;
if (block.Statements.Count () != 1)
return null;

0 comments on commit c15615d

Please sign in to comment.