Skip to content

Rosyln error CS9036 not described #46104

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
RufusJWB opened this issue May 8, 2025 · 0 comments · May be fixed by #46258
Open

Rosyln error CS9036 not described #46104

RufusJWB opened this issue May 8, 2025 · 0 comments · May be fixed by #46258
Assignees
Labels
dotnet-csharp/svc 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@RufusJWB
Copy link

RufusJWB commented May 8, 2025

It seems that the compiler error CS9036 is nowhere described. It would be great, if you could provide a documentation about it. Thank you!

This refers to the following scenario razor.fyi

class C
{
    public string? Prop { get; set; }
}
class Program
{
    public required C C { get; set; }
    static void Main()
    {
        var program = new Program()
        {
            // error CS9036: Required member 'Program.C' must be assigned a value, it cannot use a nested member or collection initializer.
            C = { Prop = "a" }
        };
    }
}

Associated WorkItem - 434158

@jaredpar jaredpar transferred this issue from dotnet/roslyn May 13, 2025
@dotnet-policy-service dotnet-policy-service bot added the ⌚ Not Triaged Not triaged label May 13, 2025
@Copilot Copilot AI linked a pull request May 19, 2025 that will close this issue
@BillWagner BillWagner self-assigned this May 20, 2025
@BillWagner BillWagner removed the ⌚ Not Triaged Not triaged label May 20, 2025
@dotnetrepoman dotnetrepoman bot added the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label May 20, 2025
@BillWagner BillWagner moved this from 🔖 Ready to 👀 In review in dotnet/docs May 2025 sprint project May 20, 2025
@dotnet-policy-service dotnet-policy-service bot removed the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label May 20, 2025
@BillWagner BillWagner added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label May 20, 2025
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels May 21, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
dotnet-csharp/svc 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

2 participants