- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for checkassignto (0.1 sec)
-
src/cmd/compile/internal/typecheck/stmt.go
n.SetType(defaultType(typ)) } if lhs[i].Typecheck() == 0 { lhs[i] = AssignExpr(lhs[i]) } checkassign(lhs[i]) } assignType := func(i int, typ *types.Type) { checkLHS(i, typ) if typ != nil { checkassignto(typ, lhs[i]) } } cr := len(rhs) if len(rhs) == 1 { rhs[0] = typecheck(rhs[0], ctxExpr|ctxMultiOK)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:10:54 UTC 2023 - 17.8K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
case n.Op() == ir.OLITERAL && n.Sym() != nil && ir.IsConstNode(n): base.Errorf("cannot assign to %v (declared const)", n) default: base.Errorf("cannot assign to %v", n) } } func checkassignto(src *types.Type, dst ir.Node) { // TODO(mdempsky): Handle all untyped types correctly. if src == types.UntypedBool && dst.Type().IsBoolean() { return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0)