diff options
-rw-r--r-- | ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs | 2 | ||||
-rw-r--r-- | ICSharpCode.NRefactory.Tests/CSharp/CSharpOutputVisitorTests.cs | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs index 37a014fc..56dbd39e 100644 --- a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs @@ -502,7 +502,7 @@ namespace ICSharpCode.NRefactory.CSharp WriteKeyword(UndocumentedExpression.RefvalueKeywordRole); break; } - if (undocumentedExpression.Arguments.Count > 0) { + if (undocumentedExpression.UndocumentedExpressionType != UndocumentedExpressionType.ArgListAccess) { Space(policy.SpaceBeforeMethodCallParentheses); WriteCommaSeparatedListInParenthesis(undocumentedExpression.Arguments, policy.SpaceWithinMethodCallParentheses); } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/CSharpOutputVisitorTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/CSharpOutputVisitorTests.cs index 8d216a3e..8e1930d9 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/CSharpOutputVisitorTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/CSharpOutputVisitorTests.cs @@ -192,5 +192,12 @@ namespace NS var options = FormattingOptionsFactory.CreateMono(); AssertOutput("#pragma warning disable 414\n", unit, options); } + + [Test] + public void Undocumented () + { + AssertOutput("__arglist", new UndocumentedExpression { UndocumentedExpressionType = UndocumentedExpressionType.ArgListAccess }); + AssertOutput("__arglist ()", new UndocumentedExpression { UndocumentedExpressionType = UndocumentedExpressionType.ArgList }); + } } } |