mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
ExpressionBuilder printed bitwise & / | on booleans as && / || whenever the right-hand side was pure, but Roslyn lowers && / || to & / | only when the right operand is a bare local or parameter read (LocalRewriter.MakeBinaryOperator, unchanged since 2014). Shapes like (c == 'a') | (c == 'b') can therefore only originate from a bitwise source operator, yet were shown as short-circuiting. Per the discussion in #1545, show the operator the IL actually uses instead of guessing the source form: the reversal is dropped entirely, so Roslyn-compiled "a && b" now decompiles to "a & b", which recompiles to the same IL. Assisted-by: Claude:claude-fable-5:Claude Codepull/3911/head
3 changed files with 17 additions and 25 deletions
Loading…
Reference in new issue