This commit is contained in:
nub31
2025-08-13 21:50:42 +02:00
parent 3ffd17f93e
commit aefb2dddb6
4 changed files with 38 additions and 7 deletions

View File

@@ -269,6 +269,7 @@ public partial class QBEGenerator
{
case ArrayInitializerNode:
case StructInitializerNode:
case InterfaceInitializerNode:
case LiteralNode { Kind: LiteralKind.String }:
{
destination = EmitUnwrap(EmitExpression(source));
@@ -282,7 +283,7 @@ public partial class QBEGenerator
private string EmitCreateCopyOrInitialize(ExpressionNode source)
{
// If the source is a value which is not used yet such as an array/struct initializer or literal, we can skip copying
// If the source is a value which is not used yet such as an array/struct/interface initializer or literal, we can skip copying
if (EmitTryCreateWithoutCopy(source, out var uncopiedValue))
{
return uncopiedValue;