- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 105 for SelectorExpr (0.18 sec)
-
src/cmd/fix/typecheck.go
case *ast.Ident: // Identifier can take its type from underlying object. if t := typeof[n.Obj]; t != "" { typeof[n] = t } case *ast.SelectorExpr: // Field or method. name := n.Sel.Name if t := typeof[n.X]; t != "" { t = strings.TrimPrefix(t, "*") // implicit * if typ := cfg.Type[t]; typ != nil { if t := typ.dot(cfg, name); t != "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 16 22:02:42 UTC 2022 - 20.1K bytes - Viewed (0) -
src/go/doc/example.go
} else if d := topDecls[e.Obj]; d != nil { usedObjs[e.Obj] = true if !usedDecls[d] { usedDecls[d] = true depDecls = append(depDecls, d) } } return true case *ast.SelectorExpr: // For selector expressions, only inspect the left hand side. // (For an expression like fmt.Println, only add "fmt" to the // set of unresolved names, not "Println".) ast.Inspect(e.X, inspectFunc)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 21.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/api_test.go
func (r *N[C]) n() { } ` f := mustParse(src) info := Info{ Defs: make(map[*syntax.Name]Object), Uses: make(map[*syntax.Name]Object), Selections: make(map[*syntax.SelectorExpr]*Selection), } var conf Config pkg, err := conf.Check("p", []*syntax.File{f}, &info) if err != nil { t.Fatal(err) } N := pkg.Scope().Lookup("N").Type().(*Named)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 93.3K bytes - Viewed (0) -
src/go/types/api_test.go
func (r *N[C]) n() { } ` fset := token.NewFileSet() f := mustParse(fset, src) info := Info{ Defs: make(map[*ast.Ident]Object), Uses: make(map[*ast.Ident]Object), Selections: make(map[*ast.SelectorExpr]*Selection), } var conf Config pkg, err := conf.Check("p", fset, []*ast.File{f}, &info) if err != nil { t.Fatal(err) } N := pkg.Scope().Lookup("N").Type().(*Named)
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/cmd/compile/internal/ir/fmt.go
} fmt.Fprint(s, ":") case OSTRUCTKEY: n := n.(*StructKeyExpr) fmt.Fprintf(s, "%v:%v", n.Field, n.Value) case OXDOT, ODOT, ODOTPTR, ODOTINTER, ODOTMETH, OMETHVALUE, OMETHEXPR: n := n.(*SelectorExpr) exprFmt(n.X, s, nprec) if n.Sel == nil { fmt.Fprint(s, ".<nil>") return } fmt.Fprintf(s, ".%s", n.Sel.Name) case ODOTTYPE, ODOTTYPE2: n := n.(*TypeAssertExpr)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 15:20:28 UTC 2023 - 26K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/printer.go
p.printExprLines(n.ElemList) } else { p.printExprList(n.ElemList) } } p.print(_Rbrace) case *ParenExpr: p.print(_Lparen, n.X, _Rparen) case *SelectorExpr: p.print(n.X, _Dot, n.Sel) case *IndexExpr: p.print(n.X, _Lbrack, n.Index, _Rbrack) case *SliceExpr: p.print(n.X, _Lbrack) if i := n.Index[0]; i != nil { p.printNode(i) }
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
// Resulting in an untyped constant (e.g., built-in complex). // The respective calls take care of calling updateExprType // for the arguments if necessary. case *ast.Ident, *ast.BasicLit, *ast.SelectorExpr: // An identifier denoting a constant, a constant literal, // or a qualified identifier (imported untyped constant). // No operands to take care of. case *ast.ParenExpr:
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/cmd/compile/internal/types2/resolver.go
} // typ must be a name, or a C.name cgo selector. var name string switch typ := typ.(type) { case *syntax.Name: name = typ.Value case *syntax.SelectorExpr: // C.struct_foo is a valid type name for packages using cgo. // // Detect this case, and adjust name so that the correct TypeName is // resolved below.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0) -
src/go/types/resolver.go
} // typ must be a name, or a C.name cgo selector. var name string switch typ := typ.(type) { case *ast.Ident: name = typ.Name case *ast.SelectorExpr: // C.struct_foo is a valid type name for packages using cgo. // // Detect this case, and adjust name so that the correct TypeName is // resolved below.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 16:22:59 UTC 2024 - 26.1K bytes - Viewed (0) -
src/cmd/doc/pkg.go
// type special when embedded in an interface, such that it // always gets shown publicly. list = append(list, field) continue } names = []*ast.Ident{ident} case *ast.SelectorExpr: // An embedded type may refer to a type in another package. names = []*ast.Ident{ident.Sel} default: // An approximation or union or type // literal in an interface. constraint = true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 20:15:52 UTC 2024 - 32K bytes - Viewed (0)