Closed aradalvand closed 3 years ago
Hi again! I'm encountering another bug. I'm trying to decompile this method:
public static CommentDto ToCommentDto(this Comment comment) { return new CommentDto { IsUserPurchaser = comment.Course.PurchaseItems.Any(pi => pi.Purchase.UserId == comment.UserId && pi.Purchase.IsFinalized), }; }
But surprisingly DelegateDecompiler gives me this:
comment => new CommentDto() { IsUserPurchaser = new { comment = comment }.comment.Course.PurchaseItems.Any(pi => ((pi.Purchase.UserId == comment.UserId) && pi.Purchase.IsFinalized)) };
It's strange! Where is new { comment = comment } even coming from?!
new { comment = comment }
Where is new { comment = comment } even coming from?!
It is from the closure. Need a visitor to unwrap such closures.
Should be fixed in 0.29.0
Hi again! I'm encountering another bug. I'm trying to decompile this method:
But surprisingly DelegateDecompiler gives me this:
It's strange! Where is
new { comment = comment }
even coming from?!