interp: fix append a slice on binary slice

Fixes #1128.
This commit is contained in:
Marc Vertes
2021-06-15 14:34:08 +02:00
committed by GitHub
parent ab44c38298
commit db955e671f
4 changed files with 37 additions and 6 deletions

View File

@@ -1601,6 +1601,13 @@ func (t *itype) hasNil() bool {
return false
}
func (t *itype) elem() *itype {
if t.cat == valueT {
return &itype{cat: valueT, rtype: t.rtype.Elem()}
}
return t.val
}
func copyDefined(m map[string]*itype) map[string]*itype {
n := make(map[string]*itype, len(m))
for k, v := range m {