interp: make Symbols method take into account type objects too

This commit is contained in:
mpl
2020-10-14 17:44:09 +02:00
committed by GitHub
parent 190dade469
commit 57b49f40d6

View File

@@ -427,6 +427,8 @@ func (interp *Interpreter) Symbols(path string) map[string]reflect.Value {
m[n] = genFunctionWrapper(s.node)(interp.frame)
case varSym:
m[n] = interp.frame.data[s.index]
case typeSym:
m[n] = reflect.New(s.typ.TypeOf())
}
}
return m