Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,196 for assignOp (0.13 sec)

  1. src/go/types/token_test.go

    	}
    }
    
    func TestAssignOp(t *testing.T) {
    	// there are fewer than 256 tokens
    	for i := 0; i < 256; i++ {
    		tok := token.Token(i)
    		got := assignOp(tok)
    		want := assignOps[tok]
    		if got != want {
    			t.Errorf("for assignOp(%s): got %s; want %s", tok, got, want)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 08 03:40:04 UTC 2015
    - 1.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/scanner.go

    		if s.ch != '+' {
    			goto assignop
    		}
    		s.nextch()
    		s.nlsemi = true
    		s.tok = _IncOp
    
    	case '-':
    		s.nextch()
    		s.op, s.prec = Sub, precAdd
    		if s.ch != '-' {
    			goto assignop
    		}
    		s.nextch()
    		s.nlsemi = true
    		s.tok = _IncOp
    
    	case '*':
    		s.nextch()
    		s.op, s.prec = Mul, precMul
    		// don't goto assignop - want _Star token
    		if s.ch == '=' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 28 18:17:41 UTC 2022
    - 17.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/subr.go

    		return ir.OXXX, why
    	}
    
    	// 1. src can be assigned to dst.
    	op, why := assignOp(src, dst)
    	if op != ir.OXXX {
    		return op, why
    	}
    
    	// The rules for interfaces are no different in conversions
    	// than assignments. If interfaces are involved, stop now
    	// with the good message from assignop.
    	// Otherwise clear the error.
    	if src.IsInterface() || dst.IsInterface() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  4. hack/golangci.yaml.in

        # over time.
    
        # https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507008918
        - linters:
            - gocritic
          text: "assignOp:"
    
        # https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507016854
        - linters:
            - gosimple
          text: "S1002: should omit comparison to bool constant"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 13 13:12:04 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. common/config/.golangci.yml

        # Which checks should be enabled in addition to default checks. Since we don't want
        # all of the default checks, we do the disable-all first.
        enabled-checks:
          - appendCombine
          - argOrder
          - assignOp
          - badCond
          - boolExprSimplify
          - builtinShadow
          - captLocal
          - caseOrder
          - codegenComment
          - commentedOutCode
          - commentedOutImport
          - defaultCaseOrder
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 20:03:06 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  6. hack/golangci-strict.yaml

        # over time.
    
        # https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507008918
        - linters:
            - gocritic
          text: "assignOp:"
    
        # https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507016854
        - linters:
            - gosimple
          text: "S1002: should omit comparison to bool constant"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 12:10:09 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/stmt.go

    				base.ErrorfAt(ncase.Pos(), errors.UndefinedOp, "invalid case %L in switch (incomparable type)", n1)
    			} else {
    				op1, _ := assignOp(n1.Type(), t)
    				op2, _ := assignOp(t, n1.Type())
    				if op1 == ir.OXXX && op2 == ir.OXXX {
    					if n.Tag != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  8. hack/golangci.yaml

        # over time.
    
        # https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507008918
        - linters:
            - gocritic
          text: "assignOp:"
    
        # https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507016854
        - linters:
            - gosimple
          text: "S1002: should omit comparison to bool constant"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 12:10:09 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/expr.go

    		// in that case, check comparability of the concrete type.
    		// The conversion allocates, so only do it if the concrete type is huge.
    		converted := false
    		if r.Type().Kind() != types.TBLANK {
    			aop, _ = assignOp(l.Type(), r.Type())
    			if aop != ir.OXXX {
    				if r.Type().IsInterface() && !l.Type().IsInterface() && !types.IsComparable(l.Type()) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  10. src/go/types/stmt.go

    	check.recordScope(node, scope)
    	check.scope = scope
    }
    
    func (check *Checker) closeScope() {
    	check.scope = check.scope.Parent()
    }
    
    func assignOp(op token.Token) token.Token {
    	// token_test.go verifies the token ordering this function relies on
    	if token.ADD_ASSIGN <= op && op <= token.AND_NOT_ASSIGN {
    		return op + (token.ADD - token.ADD_ASSIGN)
    	}
    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