You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C#: declaring only one of a comparison operator pair (==/!=, </>, <=/>=) generates code that fails with CS0216 #236
CSharpGenerator (Coder/Languages/CSharpGenerator.cs, operator signature around lines 1110-1125) writes each operator declaration independently. C# requires comparison operators to be declared in pairs: == with !=, < with >, and <= with >=. Nothing in the generator completes a pair.
Reproduction
Give struct Point a single operator: FunctionDeclaration("==") { Kind = Operator, ReturnType = bool }, with parameter rhs.
Notes: The generated code fails to compile with CS0216. The fix is well scoped: synthesize the missing partner operator, then add compile tests. Consider whether C# also needs Equals/GetHashCode overrides once == is synthesized; those produce warnings CS0660/CS0661, not errors.
Activity
matt-edmondson commentedon Oct 17, 2026
Triage
CSharpGeneratoroperator emissionNotes: The generated code fails to compile with CS0216. The fix is well scoped: synthesize the missing partner operator, then add compile tests. Consider whether C# also needs
Equals/GetHashCodeoverrides once==is synthesized; those produce warnings CS0660/CS0661, not errors.Generated by Claude Code