We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
input:
Guid? a = null; Guid? b = null; var expr = (Expression<Func<bool>>)(() => a == b);
ilspy output:
Guid? a = null; Guid? b = null; Expression<Func<bool>> expr = () => (Guid)a == (Guid)b;
they are different semantic
stloc expression(ILFunction.ET[System.Linq.Expressions.Expression`1[[System.Func`1[[System.Boolean]]]]] { BlockContainer { Block IL_0000 (incoming: 1) { leave IL_0000 (call op_Equality(ldloc a, ldloc b)) } } } ) stloc expression2(ILFunction.ET[System.Linq.Expressions.Expression`1[[System.Func`1[[System.Boolean]]]]] { BlockContainer { Block IL_0000 (incoming: 1) { leave IL_0000 (call op_Equality(expression.tree.cast System.Guid(ldloc a), expression.tree.cast System.Guid(ldloc b))) } } } )
but ilspy will decompile them to the same code
Expression<Func<bool>> expr = () => (Guid)a == (Guid)b; Expression<Func<bool>> expr2 = () => (Guid)a == (Guid)b;
ilspy version: 7.0.0.6306-preview2
The text was updated successfully, but these errors were encountered:
https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.binaryexpression.isliftedtonull?view=net-5.0 liftToNull is different with lift liftToNull means return value is also nullable
ILSpy/ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs
Lines 734 to 738 in 06bae54
Sorry, something went wrong.
fix icsharpcode#2288
30152ba
581a1de
No branches or pull requests
input:
ilspy output:
they are different semantic
but ilspy will decompile them to the same code
ilspy version: 7.0.0.6306-preview2
The text was updated successfully, but these errors were encountered: