- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 101 for ifaceeq (0.19 sec)
-
src/text/template/exec.go
// the template. func (s *state) printValue(n parse.Node, v reflect.Value) { s.at(n) iface, ok := printableValue(v) if !ok { s.errorf("can't print %s of type %s", n, v.Type()) } _, err := fmt.Fprint(s.wr, iface) if err != nil { s.writeError(err) } } // printableValue returns the, possibly indirected, interface value inside v that
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 21:22:24 UTC 2024 - 32K bytes - Viewed (0) -
src/runtime/mfinal.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 01:56:56 UTC 2024 - 19K bytes - Viewed (0) -
src/cmd/compile/internal/walk/convert.go
nif.Body = []ir.Node{ir.NewAssignStmt(base.Pos, typeWord, itabType(typeWord))} init.Append(nif) // Build the result. // e = iface{typeWord, data} e := ir.NewBinaryExpr(base.Pos, ir.OMAKEFACE, typeWord, data) e.SetType(toType) // assign type manually, typecheck doesn't understand OEFACE. e.SetTypecheck(1) return e }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 17:28:22 UTC 2023 - 18.2K bytes - Viewed (0) -
src/reflect/all_test.go
if _, ok := rv.Interface().(Iface); ok != table.impl { if table.impl { t.Errorf("test-%d-%d: type=%v fails to implement Iface.\n", i, j, table.typ) } else { t.Errorf("test-%d-%d: type=%v should NOT implement Iface\n", i, j, table.typ) } continue } if !table.impl { continue } v := rv.Interface().(Iface).Get() if v != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0) -
src/cmd/compile/internal/types/type.go
case TCHAN, TMAP, TFUNC, TUNSAFEPTR: return true case TARRAY: // Array of 1 direct iface type can be direct. return t.NumElem() == 1 && IsDirectIface(t.Elem()) case TSTRUCT: // Struct with 1 field of direct iface type can be direct. return t.NumFields() == 1 && IsDirectIface(t.Field(0).Type) } return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 49.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/switch.go
as := ir.NewAssignListStmt(c.pos, ir.OAS2, []ir.Node{ir.BlankNode, s.okName}, // _, ok = []ir.Node{ir.NewTypeAssertExpr(c.pos, s.srcName, c.typ.Type())}) // iface.(type) nif := ir.NewIfStmt(c.pos, s.okName, []ir.Node{c.jmp}, nil) clauses = append(clauses, typeClause{ hash: types.TypeHash(c.typ.Type()), body: []ir.Node{typecheck.Stmt(as), typecheck.Stmt(nif)},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 30.1K bytes - Viewed (0) -
src/reflect/type.go
// methods along the way, or else V does not implement T. // This lets us run the scan in overall linear time instead of // the quadratic time a naive search would require. // See also ../runtime/iface.go. if V.Kind() == abi.Interface { v := (*interfaceType)(unsafe.Pointer(V)) i := 0 for j := 0; j < len(v.Methods); j++ { tm := &t.Methods[i] tmName := t.nameOff(tm.Name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 85.5K bytes - Viewed (0) -
src/go/types/api_test.go
NewFunc(nopos, nil, "M", sig2), } embeddedMethods := []*Func{ NewFunc(nopos, nil, "M", sig2), } embedded := NewInterfaceType(embeddedMethods, nil) iface := NewInterfaceType(methods, []Type{embedded}) iface.Complete() } func TestNewAlias_Issue65455(t *testing.T) { obj := NewTypeName(nopos, nil, "A", nil) alias := NewAlias(obj, Typ[Int]) alias.Underlying() // must not panic }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 94.2K bytes - Viewed (0) -
src/runtime/runtime2.go
// while sema-based impl as M* waitm. // Used to be a union, but unions break precise GC. key uintptr } type funcval struct { fn uintptr // variable-size, fn-specific data here } type iface struct { tab *itab data unsafe.Pointer } type eface struct { _type *_type data unsafe.Pointer } func efaceOf(ep *any) *eface { return (*eface)(unsafe.Pointer(ep)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 47.9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/api_test.go
NewFunc(nopos, nil, "M", sig2), } embeddedMethods := []*Func{ NewFunc(nopos, nil, "M", sig2), } embedded := NewInterfaceType(embeddedMethods, nil) iface := NewInterfaceType(methods, []Type{embedded}) iface.NumMethods() // unlike go/types, there is no Complete() method, so we complete implicitly } func TestNewAlias_Issue65455(t *testing.T) { obj := NewTypeName(nopos, nil, "A", nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 93.3K bytes - Viewed (0)