dadhi / FastExpressionCompiler

Fast Compiler for C# Expression Trees and the lightweight LightExpression alternative. Diagnostic and code generation tools for the expressions.
MIT License
1.16k stars 82 forks source link

#394 - Fixed check of right operand for operators #395

Closed Marluwe closed 7 months ago

Marluwe commented 7 months ago

Changed the type check for the right operand on operators (==, !=,<=, <, >=, >).

Now an operator like

public static bool operator ==(MyType me, OtherType other) => ...

will be compiled correctly, when calling

(MyType me, OtherType other) => me == other;
dadhi commented 7 months ago

@Marluwe Hello, it was a good catch. Thank you for the fix!