Skip to content

XML doc comments in wrong places for types with primary constructors plus other feedback #3617

@mmusu3

Description

@mmusu3

After commit 94050a4 XML comments are quite broken now.

Also StructDefaultConstructorsAndFieldInitializers = false doesn't seem to work anymore and so primary constructors being generated on more structs even though they are not required and PreferPrimaryConstructorIfPossible was removed so I can't choose my preference of false.

Input

/// <summary>
/// This is a information about the parent class
/// </summary>
class C11(int value)
{
    public int Value => value;

    /// <summary>
    /// This is a different info about the nested class
    /// </summary>
    public class Nested
    {
    }

    /// <summary>
    /// Method description
    /// </summary>
    public void Test()
    {
    }
}

Output

/// <summary>
/// This is a information about the parent class
/// </summary>
private class C11(/// <summary>
/// This is a different info about the nested class
/// </summary>
/// <summary>
/// Method description
/// </summary>
int value)
{
	public class Nested
	{
	}

	public int Value => value;

	public void Test()
	{
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDecompilerThe decompiler engine itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions