- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 73 for FuncType (0.17 sec)
-
src/go/parser/resolver.go
// Note: don't try to resolve n.Sel, as we don't support qualified // resolution. case *ast.StructType: r.openScope(n.Pos()) defer r.closeScope() r.walkFieldList(n.Fields, ast.Var) case *ast.FuncType: r.openScope(n.Pos()) defer r.closeScope() r.walkFuncType(n) case *ast.CompositeLit: if n.Type != nil { ast.Walk(r, n.Type) } for _, e := range n.Elts {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 12:56:53 UTC 2023 - 15.8K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes_test.go
{"ArrayType", `@[10]T`}, {"ArrayType", `@[...]T`}, {"SliceType", `@[]T`}, {"DotsType", `@...T`}, {"StructType", `@struct{}`}, {"InterfaceType", `@interface{}`}, {"FuncType", `func@()`}, {"MapType", `@map[T]T`}, {"ChanType", `@chan T`}, {"ChanType", `@chan<- T`}, {"ChanType", `@<-chan T`}, } var fields = []test{ {"Field", `@T`}, {"Field", `@(T)`},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 18:45:06 UTC 2023 - 8.7K bytes - Viewed (0) -
src/go/printer/nodes.go
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: return isTypeElem(x.X) } return false } func (p *printer) signature(sig *ast.FuncType) { if sig.TypeParams != nil {
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/printer/printer_test.go
} } }) } } // TestFuncType tests that an ast.FuncType with a nil Params field // can be printed (per go/ast specification). Test case for issue 3870. func TestFuncType(t *testing.T) { src := &ast.File{ Name: &ast.Ident{Name: "p"}, Decls: []ast.Decl{ &ast.FuncDecl{ Name: &ast.Ident{Name: "f"}, Type: &ast.FuncType{}, }, }, } var buf bytes.Buffer
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go
// inadvertently copy a lock, by checking whether // its receiver, parameters, or return values // are locks. func checkCopyLocksFunc(pass *analysis.Pass, name string, recv *ast.FieldList, typ *ast.FuncType) { if recv != nil && len(recv.List) > 0 { expr := recv.List[0].Type if path := lockPath(pass.Pkg, pass.TypesInfo.Types[expr].Type, nil); path != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.9K bytes - Viewed (0) -
src/cmd/fix/typecheck.go
// Most of it is bottom-up, but in a few places we need // to know the type of the function we are checking. // The before function records that information on // the curfn stack. var curfn []*ast.FuncType before := func(n any) { // push function type on stack switch n := n.(type) { case *ast.FuncDecl: curfn = append(curfn, n.Type) case *ast.FuncLit: curfn = append(curfn, n.Type) }
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/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go
r := TypeExpr(f, pkg, t.Results().At(i).Type()) if r == nil { return nil } returns = append(returns, &ast.Field{ Type: r, }) } return &ast.FuncType{ Params: &ast.FieldList{ List: params, }, Results: &ast.FieldList{ List: returns, }, } case interface{ Obj() *types.TypeName }: // *types.{Alias,Named,TypeParam}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 11.7K bytes - Viewed (0) -
api/go1.18.txt
pkg debug/elf, const R_PPC64_RELATIVE R_PPC64 pkg debug/plan9obj, var ErrNoSymbols error pkg go/ast, method (*IndexListExpr) End() token.Pos pkg go/ast, method (*IndexListExpr) Pos() token.Pos pkg go/ast, type FuncType struct, TypeParams *FieldList pkg go/ast, type IndexListExpr struct pkg go/ast, type IndexListExpr struct, Indices []Expr pkg go/ast, type IndexListExpr struct, Lbrack token.Pos
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 20:31:46 UTC 2023 - 13K bytes - Viewed (0) -
src/cmd/compile/internal/rangefunc/rewrite.go
var nopos syntax.Pos // A rewriter implements rewriting the range-over-funcs in a given function. type rewriter struct { pkg *types2.Package info *types2.Info sig *types2.Signature outer *syntax.FuncType body *syntax.BlockStmt // References to important types and values. any types2.Object bool types2.Object int types2.Object true types2.Object false types2.Object
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0) -
src/go/ast/filter.go
case *ArrayType: return filterType(t.Elt, f, export) case *StructType: if filterFieldList(t.Fields, f, export) { t.Incomplete = true } return len(t.Fields.List) > 0 case *FuncType: b1 := filterParamList(t.Params, f, export) b2 := filterParamList(t.Results, f, export) return b1 || b2 case *InterfaceType: if filterFieldList(t.Methods, f, export) { t.Incomplete = true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 13.3K bytes - Viewed (0)