- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 87 for interfaceType (0.26 sec)
-
src/cmd/compile/internal/syntax/printer.go
p.print(outdent, newline) } else { p.printFieldList(n.FieldList, n.TagList, _Semi) } } p.print(_Rbrace) case *FuncType: p.print(_Func) p.printSignature(n) case *InterfaceType: p.print(_Interface) if p.linebreaks && len(n.MethodList) > 1 { p.print(blank) p.print(_Lbrace) p.print(newline, indent) p.printMethodList(n.MethodList) p.print(outdent, newline)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 24 07:17:27 UTC 2023 - 21.5K bytes - Viewed (0) -
src/go/types/expr.go
*ast.CompositeLit, *ast.IndexExpr, *ast.SliceExpr, *ast.TypeAssertExpr, *ast.StarExpr, *ast.KeyValueExpr, *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType: // These expression are never untyped - nothing to do. // The respective sub-expressions got their final types // upon assignment or use. if debug {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 49.7K bytes - Viewed (0) -
src/go/parser/parser_test.go
{name: "chan2", format: "package main; var x «<-chan »int"}, {name: "interface", format: "package main; var x «interface { M() «int» }»", scope: true, scopeMultiplier: 2}, // Scopes: InterfaceType, FuncType {name: "map", format: "package main; var x «map[int]»int"}, {name: "slicelit", format: "package main; var x = «[]any{«»}»", parseMultiplier: 2}, // Parser nodes: UnaryExpr, CompositeLit
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 24.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/expr.go
*syntax.SliceExpr, *syntax.AssertExpr, *syntax.ListExpr, //*syntax.StarExpr, *syntax.KeyValueExpr, *syntax.ArrayType, *syntax.StructType, *syntax.FuncType, *syntax.InterfaceType, *syntax.MapType, *syntax.ChanType: // These expression are never untyped - nothing to do. // The respective sub-expressions got their final types // upon assignment or use. if debug {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 51.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
// needs to take care of such type expressions. if op, _ := x.(*syntax.Operation); op != nil && (op.Op == syntax.Tilde || op.Op == syntax.Or) { t := check.typ(&syntax.InterfaceType{MethodList: []*syntax.Field{{Type: x}}}) // mark t as implicit interface if all went well if t, _ := t.(*Interface); t != nil { t.implicit = true } return t } return check.typ(x) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.6K bytes - Viewed (0) -
src/go/printer/nodes.go
// The result is false if x could be a type element OR an ordinary (value) expression. func isTypeElem(x ast.Expr) bool { switch x := x.(type) { case *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType: return true case *ast.UnaryExpr: return x.Op == token.TILDE case *ast.BinaryExpr: return isTypeElem(x.X) || isTypeElem(x.Y) case *ast.ParenExpr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/go/types/decl.go
wrap := false switch op := x.(type) { case *ast.UnaryExpr: wrap = op.Op == token.TILDE case *ast.BinaryExpr: wrap = op.Op == token.OR } if wrap { x = &ast.InterfaceType{Methods: &ast.FieldList{List: []*ast.Field{{Type: x}}}} t := check.typ(x) // mark t as implicit interface if all went well if t, _ := t.(*Interface); t != nil { t.implicit = true } return t }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0) -
src/cmd/link/internal/ld/dwarf_test.go
"internal/abi.FuncType": true, "internal/abi.MapType": true, "internal/abi.PtrType": true, "internal/abi.SliceType": true, "internal/abi.StructType": true, "internal/abi.InterfaceType": true, "internal/abi.ITab": true, } found := findTypes(t, dwarf, want) if len(found) != len(want) { t.Errorf("found %v, want %v", found, want) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 01:38:11 UTC 2024 - 48.6K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
// Check whether this is a pointer to a C union (or class) // type that contains a pointer. if unionWithPointer[t.X] { return true } return p.hasPointer(f, t.X, false) case *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType: return true case *ast.Ident: // TODO: Handle types defined within function. for _, d := range p.Decl { gd, ok := d.(*ast.GenDecl) if !ok || gd.Tok != token.TYPE {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0) -
src/reflect/value.go
func methodReceiver(op string, v Value, methodIndex int) (rcvrtype *abi.Type, t *funcType, fn unsafe.Pointer) { i := methodIndex if v.typ().Kind() == abi.Interface { tt := (*interfaceType)(unsafe.Pointer(v.typ())) if uint(i) >= uint(len(tt.Methods)) { panic("reflect: internal error: invalid method index") } m := &tt.Methods[i] if !tt.nameOff(m.Name).IsExported() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K bytes - Viewed (0)