mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
A conversion of a small integer type to Int32 returns its operand unchanged, because such values already occupy an I4 stack slot. The two operands of `(short a, int b) => a + b` are therefore Int16 and Int32, and requiring them to be equal rejected the conversion; the whole expression tree was then left untransformed, or worse, aborted the enclosing method. What BinaryNumericInstruction requires of its operands is a common stack type. TryConvertExpressionTree also has to cope with a builder that fails, rather than dereferencing the lambda it did not get. Assisted-by: Claude:claude-opus-5[1m]:Claude Codepull/4091/head
1 changed files with 10 additions and 1 deletions
Loading…
Reference in new issue