Search Options

Results per page
Sort
Preferred Languages
Advance

Results 181 - 190 of 252 for assignments (0.22 sec)

  1. test/interface/explicit.go

    	// neither of these can work,
    	// because i has an extra method
    	// that t does not, so i cannot contain a t.
    	i = t // ERROR "incompatible|missing method M"
    	t = i // ERROR "incompatible|assignment$"
    
    	i = i2 // ok
    	i2 = i // ERROR "incompatible|missing method N"
    
    	i = I(i2)  // ok
    	i2 = I2(i) // ERROR "invalid|missing N method|cannot convert"
    
    	e = E(t) // ok
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 24 17:04:15 UTC 2022
    - 2K bytes
    - Viewed (0)
  2. test/ken/cplx1.go

    // run
    
    // Copyright 2010 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 simple arithmetic and assignment for complex numbers.
    
    package main
    
    const (
    	R = 5
    	I = 6i
    
    	C1 = R + I // ADD(5,6)
    )
    
    func main() {
    	var b bool
    
    	// constants
    	b = (5 + 6i) == C1
    	if !b {
    		println("const bool 1", b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 1.4K bytes
    - Viewed (0)
  3. test/typeparam/ifaceconv.go

    type myInt int
    
    func (x myInt) foo() int {
    	return int(x + 1)
    }
    
    func h[T C](x T) interface{ foo() int } {
    	var i interface{ foo() int } = x
    	return i
    }
    func i[T C](x T) C {
    	var i C = x // conversion in assignment
    	return i
    }
    
    func j[T C](t T) C {
    	return C(t) // explicit conversion
    }
    
    func js[T any](x T) interface{} {
    	y := []T{x}
    	return interface{}(y)
    }
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  4. src/internal/types/testdata/examples/functions.go

    }
    
    // When calling our own `new`, we need to pass the type parameter
    // explicitly since there is no (value) argument from which the
    // result type could be inferred. We don't try to infer the
    // result type from the assignment to keep things simple and
    // easy to understand.
    var _ = new[int]()
    var _ *float64 = new[float64]() // the result type is indeed *float64
    
    // A function may have multiple type parameters, of course.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 30 20:19:38 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  5. test/escape_calls.go

    	n := *np
    	w := len(n.s)
    	if n == nil {
    		return 0
    	}
    	wl := walk(&n.left)
    	wr := walk(&n.right)
    	if wl < wr {
    		n.left, n.right = n.right, n.left // ERROR "ignoring self-assignment"
    		wl, wr = wr, wl
    	}
    	*np = n
    	return w + wl + wr
    }
    
    // Test for bug where func var f used prototype's escape analysis results.
    func prototype(xyz []string) {} // ERROR "xyz does not escape"
    func bar() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 22:06:07 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util.h

        mlir::tf_device::ParallelExecuteOp old_parallel_execute,
        mlir::tf_device::ParallelExecuteOp* new_parallel_execute);
    
    // Wraps single op in `tf_device.launch` for explicit device assignment.
    mlir::tf_device::LaunchOp WrapOpInLaunch(mlir::OpBuilder* builder,
                                             mlir::Location loc,
                                             mlir::Operation* op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/atomic/atomic.go

    		broken = gofmt(left) == gofmt(uarg.X)
    	} else if star, ok := left.(*ast.StarExpr); ok {
    		broken = gofmt(star.X) == gofmt(arg)
    	}
    
    	if broken {
    		pass.ReportRangef(left, "direct assignment to atomic value")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. src/go/types/gcsizes.go

    				max = a
    			}
    		}
    		return max
    	case *Slice, *Interface:
    		// Multiword data structures are effectively structs
    		// in which each element has size WordSize.
    		// Type parameters lead to variable sizes/alignments;
    		// StdSizes.Alignof won't be called for them.
    		assert(!isTypeParam(T))
    		return s.WordSize
    	case *Basic:
    		// Strings are like slices and interfaces.
    		if t.Info()&IsString != 0 {
    			return s.WordSize
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/devicemanager/types.go

    	// and is consulted to make Topology aware resource alignments
    	GetTopologyHints(pod *v1.Pod, container *v1.Container) map[string][]topologymanager.TopologyHint
    
    	// TopologyManager HintProvider provider indicates the Device Manager implements the Topology Manager Interface
    	// and is consulted to make Topology aware resource alignments per Pod
    	GetPodTopologyHints(pod *v1.Pod) map[string][]topologymanager.TopologyHint
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/TimeoutFuture.java

       * SES.schedule is called. Therefore Fire.run has to check for null. However, it should be visible
       * if Fire.run is called by delegate.addListener since addListener is called after the assignment
       * to timer, and importantly this is the main situation in which we need to be able to see the
       * write.
       *
       * 2. visibility of the writes to an afterDone() call triggered by cancel():
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 01 21:46:34 UTC 2024
    - 7.7K bytes
    - Viewed (0)
Back to top