From b93fa309f278b7fe3c6a432c0cf7873c23ef8801 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 9 Mar 2015 15:42:49 -0400 Subject: [PATCH] cmd/6g: allow componentgen of slice inside struct Change-Id: I847bf32bd0be913fad277c5e657f44df147eee14 Reviewed-on: https://go-review.googlesource.com/7729 Reviewed-by: Rob Pike Reviewed-by: Minux Ma --- src/cmd/6g/cgen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/6g/cgen.go b/src/cmd/6g/cgen.go index fba794ae20c..b757232d691 100644 --- a/src/cmd/6g/cgen.go +++ b/src/cmd/6g/cgen.go @@ -1668,7 +1668,7 @@ func componentgen(nr *gc.Node, nl *gc.Node) bool { fldcount := int64(0) for t := nl.Type.Type; t != nil; t = t.Down { - if gc.Isfat(t.Type) { + if gc.Isfat(t.Type) && !gc.Isslice(t) { goto no } if t.Etype != gc.TFIELD {