Skip to content

Commit 6e7283f

Browse files
committed
remove CreateBlockExpression section in RecortType Adapter.
With the addition of InlineExpression it only creates extra code when updating
1 parent a5f9018 commit 6e7283f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Mapster/Adapters/RecordTypeAdapter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected override Expression CreateInstantiationExpression(Expression source, E
2121
//new TDestination(src.Prop1, src.Prop2)
2222

2323
if (arg.GetConstructUsing() != null)
24-
return base.CreateInstantiationExpression(source, destination, arg); // this propably can inline Field activation, I didn’t see issue where it was requested :)
24+
return base.CreateInstantiationExpression(source, destination, arg);
2525

2626
var destType = arg.DestinationType.GetTypeInfo().IsInterface
2727
? DynamicTypeGenerator.GetTypeForInterface(arg.DestinationType, arg.Settings.Includes.Count > 0)
@@ -38,7 +38,7 @@ protected override Expression CreateInstantiationExpression(Expression source, E
3838

3939
protected override Expression CreateBlockExpression(Expression source, Expression destination, CompileArgument arg)
4040
{
41-
return base.CreateBlockExpression(source, destination, arg);
41+
return Expression.Empty();
4242
}
4343

4444
protected override Expression CreateInlineExpression(Expression source, CompileArgument arg)

0 commit comments

Comments
 (0)