interp: fix array size assignment type inference

This commit is contained in:
Dan Kortschak
2019-10-01 06:28:04 +09:30
committed by Traefiker Bot
parent bb2921b42f
commit 47923866ff
10 changed files with 106 additions and 12 deletions

View File

@@ -1351,7 +1351,7 @@ func arrayLit(n *node) {
}
var a reflect.Value
if n.typ.size > 0 {
if n.typ.sizedef {
a, _ = n.typ.zero()
} else {
a = reflect.MakeSlice(n.typ.TypeOf(), max, max)