Skip to content

Commit

Permalink
fix(code-gen/go): fix issues on combined parent-child calling wrong p…
Browse files Browse the repository at this point in the history
…arent
  • Loading branch information
sruehl committed Sep 25, 2024
1 parent 25239da commit 1b622c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ func (m *_${type.name}) SerializeWithWriteBuffer(ctx context.Context, writeBuffe
}
return nil
}
return m.${type.getParentType().orElseThrow().name}Contract.(*_${type.getParentType().orElseThrow().name}).serializeParent(ctx, writeBuffer, m, ser)
return <#if type.isDiscriminatedParentTypeDefinition()>p</#if>m.${type.getParentType().orElseThrow().name}Contract.(*_${type.getParentType().orElseThrow().name}).serializeParent(ctx, writeBuffer, m, ser)
<#else>
if popErr := writeBuffer.PopContext("${type.name}"); popErr != nil {
return errors.Wrap(popErr, "Error popping for ${type.name}")<@emitImport import="github.com/pkg/errors" />
Expand Down

0 comments on commit 1b622c3

Please sign in to comment.