{TypeOf(new(XM)), "*reflect_test.XM"},
{TypeOf(new(XM).String), "func() string"},
{TypeOf(new(XM)).Method(0).Type, "func(*reflect_test.XM) string"},
+ {ChanOf(3, TypeOf(XM{})), "chan reflect_test.XM"},
+ {MapOf(TypeOf(int(0)), TypeOf(XM{})), "map[int]reflect_test.XM"},
}
for i, test := range stringTests {
prototype := *(**chanType)(unsafe.Pointer(&ichan))
ch := new(chanType)
*ch = *prototype
+ ch.tflag = 0
ch.dir = uintptr(dir)
ch.str = resolveReflectName(newName(s, "", "", false))
ch.hash = fnv1(typ.hash, 'c', byte(dir))
mt := new(mapType)
*mt = **(**mapType)(unsafe.Pointer(&imap))
mt.str = resolveReflectName(newName(s, "", "", false))
+ mt.tflag = 0
mt.hash = fnv1(etyp.hash, 'm', byte(ktyp.hash>>24), byte(ktyp.hash>>16), byte(ktyp.hash>>8), byte(ktyp.hash))
mt.key = ktyp
mt.elem = etyp