From 7e0bfb4f54826311188f8e181099f101eec66a33 Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Thu, 25 Nov 2021 21:27:29 +0900 Subject: [PATCH] work cover test --- internal/encoder/code.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/encoder/code.go b/internal/encoder/code.go index e2382fb..a3918e5 100644 --- a/internal/encoder/code.go +++ b/internal/encoder/code.go @@ -229,6 +229,7 @@ func (c *SliceCode) ToOpcode(ctx *compileContext) Opcodes { header := newSliceHeaderCode(ctx) ctx.incIndex() codes := c.value.ToOpcode(ctx.incIndent()) + codes.First().Flags |= IndirectFlags elemCode := newSliceElemCode(ctx.withType(c.typ.Elem()), header, size) ctx.incIndex() end := newOpCode(ctx, OpSliceEnd) @@ -262,6 +263,7 @@ func (c *ArrayCode) ToOpcode(ctx *compileContext) Opcodes { ctx.incIndex() codes := c.value.ToOpcode(ctx.incIndent()) + codes.First().Flags |= IndirectFlags elemCode := newArrayElemCode(ctx.withType(elem), header, alen, size) ctx.incIndex() @@ -300,6 +302,7 @@ func (c *MapCode) ToOpcode(ctx *compileContext) Opcodes { value := newMapValueCode(ctx, header) ctx.incIndex() valueCodes := c.value.ToOpcode(ctx.incIndent()) + valueCodes.First().Flags |= IndirectFlags key := newMapKeyCode(ctx, header) ctx.incIndex()