Skip to content

[GenerateOneOf] why must the generated class be top-level (see error ONEOFGEN001) #205

@anemitoff

Description

@anemitoff

My title says it all....

I would like to write code such as

public abstact class FooQuery {
  public record Query;
  [GenerateOneOf] public partial class QueryResult : OneOfBase<Foo[], SomeError>;
}

I initially thought ONEOFGEN001 was produced by C# compiler but after taking another look I see it comes from line 124 of OneOfGenerator.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions