Skip to content

The SyntaxGenerator does not generate this and params keywords in methods #11853

@andriipatsula

Description

@andriipatsula

this keyword is not generated for extension methods:

namespace Foo
{
    public static class MyExtensions
    {
        /// `this` keyword
        public static int WordCount(this string str)
        {
            return 42;
        }
    }
}

After roundtrip: source -> ISymbol-> SyntaxGenerator -> source:

/// `this` keyword is not generated
public static int WordCount(string str) { }

params keyword is not generated for methods with variable number of arguments:

public static class Test
{
    public static void VariableNumberOfArguments(params object[] list)
    {}
}

After roundtrip: source -> ISymbol-> SyntaxGenerator -> source:

public static class Test
{
    public static void VariableNumberOfArguments(object[] list)
    {}
}

Metadata

Metadata

Assignees

Labels

area-product-constructionIssues owned by the Product Construction team. Used to label epics and untriaged, loose issues.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions