Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 677 for assignments (0.16 sec)

  1. test/escape_selfassign.go

    // errorcheck -0 -m -l
    
    // Copyright 2019 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test escape analysis for self assignments.
    
    package escape
    
    type S struct {
    	i  int
    	pi *int
    }
    
    var sink S
    
    func f(p *S) { // ERROR "leaking param: p"
    	p.pi = &p.i
    	sink = *p
    }
    
    // BAD: "leaking param: p" is too conservative
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 16:36:56 UTC 2019
    - 538 bytes
    - Viewed (0)
  2. test/fixedbugs/issue23188.go

    package main
    
    func main() {
    	arr := []int{1, 2}
    
    	// The spec says that in an assignment statement the operands
    	// of all index expressions and pointer indirections on the
    	// left, and the expressions on the right, are evaluated in
    	// the usual order. The usual order means function calls and
    	// channel operations are done first. Then the assignments are
    	// carried out one at a time. The operands of an index
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 10 21:30:26 UTC 2018
    - 943 bytes
    - Viewed (0)
  3. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/analysis/LocalValueTest.kt

                    my = m
                }
    
                my {
                    val m = my2()
                    my = m
                }
                """.trimIndent()
            )
    
            val rhsOrigins = resolution.assignments.map { it.rhs as ObjectOrigin.FromLocalValue }
            val (rhs1, rhs2) = rhsOrigins
    
            with(rhs1.assigned) {
                assertIs<ObjectOrigin.NewObjectFromMemberFunction>(this)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Feb 02 12:28:39 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  4. src/go/types/tuple.go

    package types
    
    // A Tuple represents an ordered list of variables; a nil *Tuple is a valid (empty) tuple.
    // Tuples are used as components of signatures and to represent the type of multiple
    // assignments; they are not first class types of Go.
    type Tuple struct {
    	vars []*Var
    }
    
    // NewTuple returns a new tuple for the given variables.
    func NewTuple(x ...*Var) *Tuple {
    	if len(x) > 0 {
    		return &Tuple{vars: x}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 1K bytes
    - Viewed (0)
  5. test/fixedbugs/issue23017.go

    // run
    
    // Copyright 2020 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // assignment order in multiple assignments.
    // See issue #23017
    
    package main
    
    import "fmt"
    
    func main() {}
    
    func init() {
    	var m = map[int]int{}
    	var p *int
    
    	defer func() {
    		recover()
    		check(1, len(m))
    		check(42, m[2])
    	}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Jan 03 19:48:18 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/tuple.go

    package types2
    
    // A Tuple represents an ordered list of variables; a nil *Tuple is a valid (empty) tuple.
    // Tuples are used as components of signatures and to represent the type of multiple
    // assignments; they are not first class types of Go.
    type Tuple struct {
    	vars []*Var
    }
    
    // NewTuple returns a new tuple for the given variables.
    func NewTuple(x ...*Var) *Tuple {
    	if len(x) > 0 {
    		return &Tuple{vars: x}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 26 17:18:58 UTC 2021
    - 929 bytes
    - Viewed (0)
  7. src/compress/bzip2/huffman.go

    	// each symbol (consider reflecting a tree down the middle, for
    	// example). Since the code length assignments determine the
    	// efficiency of the tree, each of these trees is equally good. In
    	// order to minimize the amount of information needed to build a tree
    	// bzip2 uses a canonical tree so that it can be reconstructed given
    	// only the code length assignments.
    
    	if len(lengths) < 2 {
    		panic("newHuffmanTree: too few symbols")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:44:37 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  8. src/sort/sort.go

    This is best possible as each element might need a move.
    
    Pay attention when comparing to other optimal algorithms which
    typically count the number of assignments instead of swaps:
    E.g. the optimal algorithm of Dudzinski and Dydek for in-place
    rotations uses O(u + v + gcd(u,v)) assignments which is
    better than our O(3 * (u+v)) as gcd(u,v) <= u.
    
    
    Stable sorting by SymMerge and BlockSwap rotations
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 28 16:40:32 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/assign/assign.go

    // Copyright 2013 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package assign
    
    // TODO(adonovan): check also for assignments to struct fields inside
    // methods that are on T instead of *T.
    
    import (
    	_ "embed"
    	"fmt"
    	"go/ast"
    	"go/token"
    	"go/types"
    	"reflect"
    
    	"golang.org/x/tools/go/analysis"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  10. samples/tlssurvey/src/main/kotlin/okhttp3/survey/Iana.kt

        } ?: throw IllegalArgumentException("No such suite: $javaName")
      }
    }
    
    suspend fun fetchIanaSuites(okHttpClient: OkHttpClient): IanaSuites {
      val url = "https://www.iana.org/assignments/tls-parameters/tls-parameters-4.csv"
    
      val call = okHttpClient.newCall(Request(url.toHttpUrl()))
    
      val suites =
        call.executeAsync().use {
          if (!it.isSuccessful) {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Thu Apr 18 01:24:38 UTC 2024
    - 2K bytes
    - Viewed (0)
Back to top