Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for checksliceindex (0.2 sec)

  1. src/cmd/compile/internal/typecheck/expr.go

    		base.Errorf("cannot slice %v (type %v)", l, t)
    		n.SetType(nil)
    		return n
    	}
    
    	if n.Low != nil && !checksliceindex(l, n.Low, tp) {
    		n.SetType(nil)
    		return n
    	}
    	if n.High != nil && !checksliceindex(l, n.High, tp) {
    		n.SetType(nil)
    		return n
    	}
    	if n.Max != nil && !checksliceindex(l, n.Max, tp) {
    		n.SetType(nil)
    		return n
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/typecheck.go

    		}
    		as.SetOp(ir.OAS2FUNC)
    		n.SetOp(ir.OAS2)
    		n.Rhs = make([]ir.Node, len(list))
    		for i, tmp := range list {
    			n.Rhs[i] = AssignConv(tmp, n.Lhs[i].Type(), "assignment")
    		}
    	}
    }
    
    func checksliceindex(l ir.Node, r ir.Node, tp *types.Type) bool {
    	t := r.Type()
    	if t == nil {
    		return false
    	}
    	if !t.IsInteger() {
    		base.Errorf("invalid slice index %v (type %v)", r, t)
    		return false
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
Back to top