- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for TypeAssertExpr (0.3 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/ifaceassert/ifaceassert.go
nodeFilter := []ast.Node{ (*ast.TypeAssertExpr)(nil), (*ast.TypeSwitchStmt)(nil), } var free typeparams.Free inspect.Preorder(nodeFilter, func(n ast.Node) { var ( assert *ast.TypeAssertExpr // v.(T) expression targets []ast.Expr // interfaces T in v.(T) ) switch n := n.(type) { case *ast.TypeAssertExpr: // take care of v.(type) in *ast.TypeSwitchStmt
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 2.8K bytes - Viewed (0) -
src/go/ast/ast.go
Max Expr // maximum capacity of slice; or nil Slice3 bool // true if 3-index slice (2 colons present) Rbrack token.Pos // position of "]" } // A TypeAssertExpr node represents an expression followed by a // type assertion. // TypeAssertExpr struct { X Expr // expression Lparen token.Pos // position of "(" Type Expr // asserted type; nil means type switch X.(type)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
src/go/ast/walk.go
case *SliceExpr: Walk(v, n.X) if n.Low != nil { Walk(v, n.Low) } if n.High != nil { Walk(v, n.High) } if n.Max != nil { Walk(v, n.Max) } case *TypeAssertExpr: Walk(v, n.X) if n.Type != nil { Walk(v, n.Type) } case *CallExpr: Walk(v, n.Fun) walkList(v, n.Args) case *StarExpr: Walk(v, n.X) case *UnaryExpr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K bytes - Viewed (0) -
src/go/types/expr.go
return // nothing to do } // update operands of x if necessary switch x := x.(type) { case *ast.BadExpr, *ast.FuncLit, *ast.CompositeLit, *ast.IndexExpr, *ast.SliceExpr, *ast.TypeAssertExpr, *ast.StarExpr, *ast.KeyValueExpr, *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType:
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/typecheck/expr.go
n.SetOp(ir.OMETHVALUE) n.SetType(NewMethodType(n.Type(), nil)) } return n } // tcDotType typechecks an ODOTTYPE node. func tcDotType(n *ir.TypeAssertExpr) ir.Node { n.X = Expr(n.X) n.X = DefaultLit(n.X, nil) l := n.X t := l.Type() if t == nil { n.SetType(nil) return n } if !t.IsInterface() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0) -
src/go/types/stmt.go
default: check.error(s, InvalidSyntaxTree, "incorrect form of type switch guard") return } // rhs must be of the form: expr.(type) and expr must be an ordinary interface expr, _ := rhs.(*ast.TypeAssertExpr) if expr == nil || expr.Type != nil { check.error(s, InvalidSyntaxTree, "incorrect form of type switch guard") return } var x operand check.expr(nil, &x, expr.X) if x.mode == invalid {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.6K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
// exprs case ir.OCOMPLIT: return tcCompLit(n.(*ir.CompLitExpr)) case ir.OXDOT, ir.ODOT: n := n.(*ir.SelectorExpr) return tcDot(n, top) case ir.ODOTTYPE: n := n.(*ir.TypeAssertExpr) return tcDotType(n) case ir.OINDEX: n := n.(*ir.IndexExpr) return tcIndex(n) case ir.ORECV: n := n.(*ir.UnaryExpr) return tcRecv(n) case ir.OSEND:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"SwitchStmt.Init", Field, 0}, {"SwitchStmt.Switch", Field, 0}, {"SwitchStmt.Tag", Field, 0}, {"Typ", Const, 0}, {"TypeAssertExpr", Type, 0}, {"TypeAssertExpr.Lparen", Field, 2}, {"TypeAssertExpr.Rparen", Field, 2}, {"TypeAssertExpr.Type", Field, 0}, {"TypeAssertExpr.X", Field, 0}, {"TypeSpec", Type, 0}, {"TypeSpec.Assign", Field, 9}, {"TypeSpec.Comment", 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) -
src/cmd/compile/internal/ssagen/ssa.go
s.callResult(n.Call.(*ir.CallExpr), callGo) case ir.OAS2DOTTYPE: n := n.(*ir.AssignListStmt) var res, resok *ssa.Value if n.Rhs[0].Op() == ir.ODOTTYPE2 { res, resok = s.dottype(n.Rhs[0].(*ir.TypeAssertExpr), true) } else { res, resok = s.dynamicDottype(n.Rhs[0].(*ir.DynamicTypeAssertExpr), true) } deref := false if !ssa.CanSSA(n.Rhs[0].Type()) { if res.Op != ssa.OpLoad {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 284.9K bytes - Viewed (0)