reflect.Value.Type (method)
131 uses
reflect (current package)
deepequal.go#L28: if v1.Type() != v2.Type() {
deepequal.go#L77: typ := v1.Type()
deepequal.go#L215: if v1.Type() != v2.Type() {
makefunc.go#L106: ftyp := (*funcType)(unsafe.Pointer(v.Type().(*rtype)))
swapper.go#L33: typ := v.Type().Elem().(*rtype)
value.go#L405: if xt, targ := in[i].Type(), t.In(i); !xt.AssignableTo(targ) {
value.go#L416: if xt := x.Type(); !xt.AssignableTo(elem) {
value.go#L1880: return "<" + v.Type().String() + " Value>"
value.go#L1905: func (v Value) Type() Type {
value.go#L2040: t := MakeSlice(s.Type(), i1, m)
value.go#L2061: typesMustMatch("reflect.AppendSlice", s.Type().Elem(), t.Type().Elem())
value.go#L2668: if v.Type().Kind() == Float32 && t.Kind() == Float32 {
encoding/asn1
asn1.go#L677: fieldType := v.Type()
asn1.go#L898: if val.Type().Size() == 4 {
asn1.go#L987: err = StructuralError{"unsupported: " + v.Type().String()}
marshal.go#L462: switch value.Type() {
marshal.go#L488: t := v.Type()
marshal.go#L536: sliceType := v.Type()
marshal.go#L584: if v.Kind() == reflect.Interface && v.Type().NumMethod() == 0 {
marshal.go#L593: defaultValue := reflect.New(v.Type()).Elem()
marshal.go#L605: if reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) {
marshal.go#L610: if v.Type() == rawValueType {
marshal.go#L624: matchAny, tag, isCompound, ok := getUniversalType(v.Type())
marshal.go#L626: return nil, StructuralError{fmt.Sprintf("unknown Go type: %v", v.Type())}
encoding/binary
binary.go#L408: if s := sizeof(v.Type().Elem()); s >= 0 {
binary.go#L414: t := v.Type()
binary.go#L423: return sizeof(v.Type())
binary.go#L549: t := v.Type()
binary.go#L618: t := v.Type()
binary.go#L639: switch v.Type().Kind() {
binary.go#L651: switch v.Type().Kind() {
binary.go#L663: switch v.Type().Kind() {
binary.go#L671: switch v.Type().Kind() {
encoding/gob
decode.go#L233: v.Set(reflect.New(v.Type().Elem()))
decode.go#L374: errorf("bad %s slice length: %d", value.Type(), n)
decode.go#L377: value.Set(reflect.MakeSlice(value.Type(), n, n))
decode.go#L392: errorf("bad %s slice length: %d", value.Type(), n)
decode.go#L521: isPtr := value.Type().Elem().Kind() == reflect.Ptr
decode.go#L615: typ := value.Type()
decode.go#L656: value.Set(reflect.Zero(value.Type()))
decode.go#L1189: ut := userType(value.Type())
decoder.go#L184: if value.Type().Kind() != reflect.Ptr {
encode.go#L390: errorf("gob: cannot encode nil pointer of type %s inside interface", iv.Elem().Type())
encode.go#L400: ut := userType(iv.Elem().Type())
encode.go#L465: panic("unknown type in isZero " + val.Type().String())
encode.go#L700: if ut.externalEnc == 0 && value.Type().Kind() == reflect.Struct {
encoder.go#L223: panic("gob: cannot encode nil pointer of type " + value.Type().String())
encoder.go#L234: ut, err := validUserType(value.Type())
encoding/json
decode.go#L440: if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() {
decode.go#L472: v.Set(reflect.New(v.Type().Elem()))
decode.go#L474: if v.Type().NumMethod() > 0 && v.CanInterface() {
decode.go#L506: d.saveError(&UnmarshalTypeError{Value: "array", Type: v.Type(), Offset: int64(d.off)})
decode.go#L524: d.saveError(&UnmarshalTypeError{Value: "array", Type: v.Type(), Offset: int64(d.off)})
decode.go#L547: newv := reflect.MakeSlice(v.Type(), v.Len(), newcap)
decode.go#L584: z := reflect.Zero(v.Type().Elem())
decode.go#L593: v.Set(reflect.MakeSlice(v.Type(), 0, 0))
decode.go#L612: d.saveError(&UnmarshalTypeError{Value: "object", Type: v.Type(), Offset: int64(d.off)})
decode.go#L617: t := v.Type()
decode.go#L722: d.saveError(fmt.Errorf("json: cannot set embedded pointer to unexported struct: %v", subv.Type().Elem()))
decode.go#L729: subv.Set(reflect.New(subv.Type().Elem()))
decode.go#L762: d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", subv.Type()))
decode.go#L854: d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
decode.go#L865: d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
decode.go#L875: d.saveError(&UnmarshalTypeError{Value: val, Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L881: return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
decode.go#L895: d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
decode.go#L900: v.Set(reflect.Zero(v.Type()))
decode.go#L908: d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
decode.go#L914: d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
decode.go#L916: d.saveError(&UnmarshalTypeError{Value: "bool", Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L924: d.saveError(&UnmarshalTypeError{Value: "bool", Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L932: return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
decode.go#L938: d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L940: if v.Type().Elem().Kind() != reflect.Uint8 {
decode.go#L941: d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L952: if v.Type() == numberType && !isValidNumber(string(s)) {
decode.go#L960: d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L967: return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
decode.go#L974: if v.Kind() == reflect.String && v.Type() == numberType {
decode.go#L981: return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())
decode.go#L983: d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L991: d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L999: d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L1007: d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())})
decode.go#L1013: n, err := strconv.ParseFloat(s, v.Type().Bits())
decode.go#L1015: d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())})
encode.go#L378: return typeEncoder(v.Type())
encode.go#L485: e.error(&MarshalerError{v.Type(), err, "MarshalJSON"})
encode.go#L502: e.error(&MarshalerError{v.Type(), err, "MarshalJSON"})
encode.go#L518: e.error(&MarshalerError{v.Type(), err, "MarshalText"})
encode.go#L532: e.error(&MarshalerError{v.Type(), err, "MarshalText"})
encode.go#L620: if v.Type() == numberType {
encode.go#L720: e.error(&UnsupportedTypeError{v.Type()})
encode.go#L789: e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
encode.go#L802: e.error(fmt.Errorf("json: encoding error for type %q: %q", v.Type().String(), err.Error()))
encode.go#L883: e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
encode.go#L939: e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
fmt
print.go#L326: p.buf.writeString(v.Type().String())
print.go#L341: p.buf.writeString(p.value.Type().String())
print.go#L512: p.buf.writeString(value.Type().String())
print.go#L760: p.buf.writeString(f.Type().String())
print.go#L789: p.buf.writeString(f.Type().String())
print.go#L801: if name := f.Type().Field(i).Name; name != "" {
print.go#L813: p.buf.writeString(f.Type().String())
print.go#L825: t := f.Type()
print.go#L846: p.buf.writeString(f.Type().String())
scan.go#L1021: s.errorString("type not a pointer: " + val.Type().String())
scan.go#L1028: v.SetInt(s.scanInt(verb, v.Type().Bits()))
scan.go#L1030: v.SetUint(s.scanUint(verb, v.Type().Bits()))
scan.go#L1035: typ := v.Type()
scan.go#L1037: s.errorString("can't scan type: " + val.Type().String())
scan.go#L1047: v.SetFloat(s.convertFloat(s.floatToken(), v.Type().Bits()))
scan.go#L1049: v.SetComplex(s.scanComplex(verb, v.Type().Bits()))
scan.go#L1051: s.errorString("can't scan type: " + val.Type().String())
internal/fmtsort
sort.go#L53: if mapValue.Type().Kind() != reflect.Map {
sort.go#L80: aType, bType := aVal.Type(), bVal.Type()
sort.go#L174: c := compare(reflect.ValueOf(aVal.Elem().Type()), reflect.ValueOf(bVal.Elem().Type()))
net/http
transport.go#L372: if rv := reflect.ValueOf(altProto["https"]); rv.IsValid() && rv.Type().Kind() == reflect.Struct && rv.Type().NumField() == 1 {
net/http/httptrace
trace.go#L181: structType := tv.Type()
trace.go#L184: hookType := tf.Type()
src.elv.sh/pkg/eval
go_fn.go#L239: if len(outs) > 0 && outs[len(outs)-1].Type() == errorType {
options.go#L31: for i := 0; i < struc.Type().NumField(); i++ {
options.go#L36: f := struc.Type().Field(i)
src.elv.sh/pkg/eval/vals
repr.go#L83: vType := vValue.Type()
src.elv.sh/pkg/rpc
server.go#L234: sname := reflect.Indirect(s.rcvr).Type().Name()