Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ void IStatementTransform.Run(Block block, int pos, StatementTransformContext con
instType = c.Method.TypeArguments[0];
blockKind = BlockKind.ObjectInitializer;
break;
case CastClass cc when context.Settings.WithExpressions && cc.Argument is CallInstruction innerCall && IsRecordCloneMethodCall(innerCall):
instType = innerCall.Method.DeclaringType;
blockKind = BlockKind.WithInitializer;
initInst = innerCall.Arguments.Single();
break;
case CallInstruction ci when context.Settings.WithExpressions && IsRecordCloneMethodCall(ci):
instType = ci.Method.DeclaringType;
blockKind = BlockKind.WithInitializer;
Expand Down
Loading