Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

RefSource generator generates setter instead of init #14859

Open
2 tasks
ManickaP opened this issue Jun 17, 2024 · 0 comments
Open
2 tasks

RefSource generator generates setter instead of init #14859

ManickaP opened this issue Jun 17, 2024 · 0 comments

Comments

@ManickaP
Copy link
Member

  • This issue is blocking
  • This issue is causing unreasonable pain

Generated Ref source from System.Net.Quic src for the new API in dotnet/runtime#101534 (using dotnet msbuild /t:GenerateReferenceAssemblySource).
Source:

public readonly struct QuicStreamCapacityChangedArgs
{
    public int BidirectionalIncrement { get; init; }
    public int UnidirectionalIncrement { get; init; }
}

Generated Ref:

public readonly partial struct QuicStreamCapacityChangedArgs
{
    private readonly int _dummyPrimitive;
    public int BidirectionalIncrement { get { throw null; } set { } }
    public int UnidirectionalIncrement { get { throw null; } set { } }
}

Expected Ref:

public readonly partial struct QuicStreamCapacityChangedArgs
{
    public int BidirectionalIncrement { get { throw null; } init { } }
    public int UnidirectionalIncrement { get { throw null; } init { } }
}
@missymessa missymessa added this to the Tracking for other teams milestone Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants