Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for useLHS (0.32 sec)

  1. src/cmd/compile/internal/types2/assignments.go

    	// resulting in 2 or more values; otherwise we have an assignment mismatch.
    	if r != 1 {
    		// Only report a mismatch error if there are no other errors on the lhs or rhs.
    		okLHS := check.useLHS(lhs...)
    		okRHS := check.use(orig_rhs...)
    		if okLHS && okRHS {
    			check.assignError(orig_rhs, l, r)
    		}
    		return
    	}
    
    	rhs, commaOk := check.multiExpr(orig_rhs[0], l == 2)
    	r = len(rhs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 23 21:21:43 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  2. src/go/types/assignments.go

    	// resulting in 2 or more values; otherwise we have an assignment mismatch.
    	if r != 1 {
    		// Only report a mismatch error if there are no other errors on the lhs or rhs.
    		okLHS := check.useLHS(lhs...)
    		okRHS := check.use(orig_rhs...)
    		if okLHS && okRHS {
    			check.assignError(orig_rhs, l, r)
    		}
    		return
    	}
    
    	rhs, commaOk := check.multiExpr(orig_rhs[0], l == 2)
    	r = len(rhs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  3. src/go/types/call.go

    func (check *Checker) use(args ...ast.Expr) bool { return check.useN(args, false) }
    
    // useLHS is like use, but doesn't "use" top-level identifiers.
    // It should be called instead of use if the arguments are
    // expressions on the lhs of an assignment.
    func (check *Checker) useLHS(args ...ast.Expr) bool { return check.useN(args, true) }
    
    func (check *Checker) useN(args []ast.Expr, lhs bool) bool {
    	ok := true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/call.go

    func (check *Checker) use(args ...syntax.Expr) bool { return check.useN(args, false) }
    
    // useLHS is like use, but doesn't "use" top-level identifiers.
    // It should be called instead of use if the arguments are
    // expressions on the lhs of an assignment.
    func (check *Checker) useLHS(args ...syntax.Expr) bool { return check.useN(args, true) }
    
    func (check *Checker) useN(args []syntax.Expr, lhs bool) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  5. src/go/types/stmt.go

    		// declaration, but the post statement must not."
    		if s, _ := s.Post.(*ast.AssignStmt); s != nil && s.Tok == token.DEFINE {
    			check.softErrorf(s, InvalidPostDecl, "cannot declare in post statement")
    			// Don't call useLHS here because we want to use the lhs in
    			// this erroneous statement so that we don't get errors about
    			// these lhs variables being declared and not used.
    			check.use(s.Lhs...) // avoid follow-up errors
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
Back to top