Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 73 for interfaceType (1.1 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"IndexListExpr.Lbrack", Field, 18},
    		{"IndexListExpr.Rbrack", Field, 18},
    		{"IndexListExpr.X", Field, 18},
    		{"Inspect", Func, 0},
    		{"InterfaceType", Type, 0},
    		{"InterfaceType.Incomplete", Field, 0},
    		{"InterfaceType.Interface", Field, 0},
    		{"InterfaceType.Methods", Field, 0},
    		{"IsExported", Func, 0},
    		{"IsGenerated", Func, 21},
    		{"KeyValueExpr", Type, 0},
    		{"KeyValueExpr.Colon", Field, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  8. src/cmd/cgo/out.go

    		}
    		// Non-slice array types are not supported.
    	case *ast.StructType:
    		// Not supported.
    	case *ast.FuncType:
    		return &Type{Size: p.PtrSize, Align: p.PtrSize, C: c("void*")}
    	case *ast.InterfaceType:
    		return &Type{Size: 2 * p.PtrSize, Align: p.PtrSize, C: c("GoInterface")}
    	case *ast.MapType:
    		return &Type{Size: p.PtrSize, Align: p.PtrSize, C: c("GoMap")}
    	case *ast.ChanType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:10 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/dwarf.go

    		"type:internal/abi.FuncType",
    		"type:internal/abi.MapType",
    		"type:internal/abi.PtrType",
    		"type:internal/abi.SliceType",
    		"type:internal/abi.StructType",
    		"type:internal/abi.InterfaceType",
    		"type:internal/abi.ITab",
    		"type:internal/abi.Imethod"} {
    		d.defgotype(d.lookupOrDiag(typ))
    	}
    
    	// fake root DIE for compile unit DIEs
    	var dwroot dwarf.DWDie
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 16:25:18 UTC 2024
    - 72.4K bytes
    - Viewed (0)
  10. doc/go1.17_spec.html

    </p>
    
    <pre class="ebnf">
    Type      = TypeName | TypeLit | "(" Type ")" .
    TypeName  = identifier | QualifiedIdent .
    TypeLit   = ArrayType | StructType | PointerType | FunctionType | InterfaceType |
    	    SliceType | MapType | ChannelType .
    </pre>
    
    <p>
    The language <a href="#Predeclared_identifiers">predeclares</a> certain type names.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
Back to top