-
Notifications
You must be signed in to change notification settings - Fork 88
Omitting primitive equality breaks interface generation #682
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
You can omit primitive equality generation with:
[assembly: VogenDefaults(primitiveEqualityGeneration: PrimitiveEqualityGeneration.Omit)];But this conflicts with other generated code, in particular the generation of the IVogen<> interface. To demonstrate, this cominbation causes compilation errors as IVogen expects implementers to have equality to the primitive:
[assembly: VogenDefaults(
primitiveEqualityGeneration: PrimitiveEqualityGeneration.Omit,
staticAbstractsGeneration: StaticAbstractsGeneration.MostCommon | StaticAbstractsGeneration.InstanceMethodsAndProperties)]... causes...
Error CS0535 : 'ToDoItemId' does not implement interface member 'IVogen<ToDoItemId, int>.operator ==(ToDoItemId, int)'
### Steps to reproduce
Omit equality to primitive generation, and specify IVogen interface generation.
### Expected behaviour
For `IVogen<>` to not declare primitive equality methods and operators.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working