Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 552 for reassignment (0.2 sec)

  1. src/cmd/vet/testdata/assign/assign.go

    // This file contains tests for the useless-assignment checker.
    
    package assign
    
    import "math/rand"
    
    type ST struct {
    	x int
    	l []int
    }
    
    func (s *ST) SetX(x int, ch chan int) {
    	// Accidental self-assignment; it should be "s.x = x"
    	x = x // ERROR "self-assignment of x to x"
    	// Another mistake
    	s.x = s.x // ERROR "self-assignment of s.x to s.x"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 20 15:46:42 UTC 2019
    - 804 bytes
    - Viewed (0)
  2. test/fixedbugs/issue26616.go

    package p
    
    var x int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|multiple-value function call in single-value context|multiple-value "
    
    func f() {
    	var _ int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|multiple-value function call in single-value context|multiple-value "
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 23 19:41:41 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  3. src/go/types/assignments.go

    // This file implements initialization and assignment checks.
    
    package types
    
    import (
    	"fmt"
    	"go/ast"
    	. "internal/types/errors"
    	"strings"
    )
    
    // assignment reports whether x can be assigned to a variable of type T,
    // if necessary by attempting to convert untyped values to the appropriate
    // type. context describes the context in which the assignment takes place.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  4. platforms/core-configuration/declarative-dsl-tooling-models/src/main/kotlin/org/gradle/declarative/dsl/evaluation/OperationGenerationId.kt

     *
     * The order of generations is important as calls in later generations can override calls in earlier generations, but no the
     * other way around.
     * For instance, a property assignment can override a convention assignment, but a convention assignment cannot override a property assignment.
     */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 30 12:25:46 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  5. test/fixedbugs/issue27595.go

    package main
    
    var a = twoResults()       // ERROR "assignment mismatch: 1 variable but twoResults returns 2 values|multiple-value twoResults\(\) .*in single-value context"
    var b, c, d = twoResults() // ERROR "assignment mismatch: 3 variables but twoResults returns 2 values|cannot initialize"
    var e, f = oneResult()     // ERROR "assignment mismatch: 2 variables but oneResult returns 1 value|cannot initialize"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 23 19:41:41 UTC 2021
    - 670 bytes
    - Viewed (0)
  6. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/references/ReadWriteAccessCheckerFirImpl.kt

            val function = assignment.operationReference.mainReference.resolve() as? KtNamedFunction ?: return null
            val name = function.name ?: return null
            return if (Name.identifier(name) in OperatorConventions.ASSIGNMENT_OPERATIONS.values)
                ReferenceAccess.READ to assignment
            else
                null
        }
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed Apr 10 16:23:23 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/assignments.go

    // This file implements initialization and assignment checks.
    
    package types2
    
    import (
    	"cmd/compile/internal/syntax"
    	"fmt"
    	. "internal/types/errors"
    	"strings"
    )
    
    // assignment reports whether x can be assigned to a variable of type T,
    // if necessary by attempting to convert untyped values to the appropriate
    // type. context describes the context in which the assignment takes place.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 23 21:21:43 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  8. clause/set_test.go

    	}{
    		{
    			[]clause.Interface{
    				clause.Update{},
    				clause.Set([]clause.Assignment{{clause.PrimaryColumn, 1}}),
    			},
    			"UPDATE `users` SET `users`.`id`=?",
    			[]interface{}{1},
    		},
    		{
    			[]clause.Interface{
    				clause.Update{},
    				clause.Set([]clause.Assignment{{clause.PrimaryColumn, 1}}),
    				clause.Set([]clause.Assignment{{clause.Column{Name: "name"}, "jinzhu"}}),
    			},
    			"UPDATE `users` SET `name`=?",
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  9. test/assign.go

    		_ = x
    	}
    	{
    		var x, y [2]sync.Mutex
    		x = y // ok
    		_ = x
    	}
    	{
    		var x, y [2]T
    		x = y // ok
    		_ = x
    	}
    	{
    		x := sync.Mutex{0, 0} // ERROR "assignment.*Mutex"
    		_ = x
    	}
    	{
    		x := sync.Mutex{key: 0} // ERROR "(unknown|assignment).*Mutex"
    		_ = x
    	}
    	{
    		x := &sync.Mutex{} // ok
    		var y sync.Mutex   // ok
    		y = *x             // ok
    		*x = y             // ok
    		_ = x
    		_ = y
    	}
    	{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 14 20:13:36 UTC 2020
    - 1K bytes
    - Viewed (0)
  10. test/fixedbugs/bug324.dir/prog.go

    	var px p.Exported
    	px = p.X
    	
    	// this assignment is correctly illegal:
    	//	px.private undefined (cannot refer to unexported field or method private)
    	// px.private()
    
    	// this assignment is correctly illegal:
    	//	*Implementation does not implement p.Exported (missing p.private method)
    	// px = new(Implementation)
    
    	// this assignment is correctly illegal:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 07 16:37:05 UTC 2012
    - 1.2K bytes
    - Viewed (0)
Back to top