Skip to content

Commit f5c1a4a

Browse files
committed
#191 - update visit WithExpression to use IdentifierReference for copyFrom initialization
1 parent 01beb2a commit f5c1a4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Application/HydraScript.Application.CodeGeneration/Visitors/ExpressionInstructionProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ public AddressedInstructions Visit(WithExpression visitable)
181181

182182
result.AddRange(visitable.Expression is PrimaryExpression ? [] : visitable.Expression.Accept(This));
183183

184-
var copyFrom = visitable.Expression is PrimaryExpression primary
185-
? (Name)_valueDtoConverter.Convert(primary.ToValueDto())
184+
var copyFrom = visitable.Expression is IdentifierReference objectIdent
185+
? new Name(objectIdent)
186186
: new Name(result.OfType<Simple>().Last().Left!);
187187

188188
for (var i = 0; i < visitable.ComputedCopiedProperties.Count; i++)

0 commit comments

Comments
 (0)