Browse Source

Fix output of using statement when the resource acquisition is a VariableDeclarationStatement.

newNRvisualizers
Daniel Grunwald 15 years ago
parent
commit
7e03cf8b16
  1. 2
      ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

2
ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

@ -263,7 +263,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -263,7 +263,7 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary>
void Semicolon()
{
if (!(currentContainerNode.Parent is ForStatement)) {
if (currentContainerNode.Role != ForStatement.InitializerRole && currentContainerNode.Role != ForStatement.IteratorRole && currentContainerNode.Role != UsingStatement.ResourceAcquisitionRole) {
WriteToken(";", AstNode.Roles.Semicolon);
NewLine();
}

Loading…
Cancel
Save