Skip to content

Assignment expression not converted properly #260

@Bretttt

Description

@Bretttt
class MyClass
{
    public string MyProperty {get; set;}
}

Func<MyClass, string> func = v => v.MyProperty = "I wish to assign this value";
LambdaExpression decompiled = DecompileExtensions.Decompile(func);

Expected body:
Binary expression (node type Assign) with Left = {v.MyProperty}, Right = Constant("I wish to assign this value")

Actual body:

Block expression containing two expressions:

  1. Binary expression (node type Assign) with Left = {v.MyProperty}, Right = Constant("I wish to assign this value")
  2. constant("I wish to assign this value")

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions