Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for newBar (0.13 sec)

  1. src/cmd/compile/internal/inline/inlheur/testdata/props/returns2.go

    	x int
    	y string
    }
    
    func (b *Bar) Plark() Itf {
    	return b
    }
    
    type Itf interface {
    	Plark() Itf
    }
    
    func newBar(x int) Itf {
    	s := 0
    	for i := 0; i < x; i++ {
    		s += i
    	}
    	return &Bar{
    		x: s,
    	}
    }
    
    func newBar2(x int) (int, Itf, bool) {
    	s := 0
    	for i := 0; i < x; i++ {
    		s += i
    	}
    	return 0, &Bar{x: s}, false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:01 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. test/fixedbugs/issue5581.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 main
    
    import "fmt"
    
    func NewBar() *Bar { return nil }
    
    func (x *Foo) Method() (int, error) {
    	for y := range x.m {
    		_ = y.A
    	}
    	return 0, nil
    }
    
    type Foo struct {
    	m map[*Bar]int
    }
    
    type Bar struct {
    	A *Foo
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 575 bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc

            arg_type = quantize_output.getType();
            new_arg = block.addArgument(arg_type, loc);
            quantize_output.replaceAllUsesWith(new_arg);
          } else if (input_type.isUnsignedInteger(
                         current_type.getIntOrFloatBitWidth())) {  // int8 != uint8
            arg_type = quant::ConvertSignedQuantizedToUnsigned(
                quantize_output.getType(), loc);
            new_arg = block.addArgument(arg_type, loc);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedmanager.go

    	newLiveObj, newManaged, newErr := f.fieldManager.Apply(liveObj, newObj, managed, manager, force)
    	// Upgrade the client-side apply annotation only from kubectl server-side-apply.
    	// To opt-out of this behavior, users may specify a different field manager.
    	if manager != "kubectl" {
    		return newLiveObj, newManaged, newErr
    	}
    
    	// Check if we have conflicts
    	if newErr == nil {
    		return newLiveObj, newManaged, newErr
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  5. src/crypto/cipher/ctr.go

    // implementation of CTR, like crypto/aes. NewCTR will check for this interface
    // and return the specific Stream if found.
    type ctrAble interface {
    	NewCTR(iv []byte) Stream
    }
    
    // NewCTR returns a [Stream] which encrypts/decrypts using the given [Block] in
    // counter mode. The length of iv must be the same as the [Block]'s block size.
    func NewCTR(block Block, iv []byte) Stream {
    	if ctr, ok := block.(ctrAble); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  6. subprojects/core/src/testFixtures/groovy/org/gradle/api/tasks/AbstractCopyTaskContractTest.groovy

        }
    
        private static File createDir(File parentDir, String path) {
            TestFile newDir = new TestFile(parentDir, path)
            boolean success = newDir.mkdirs()
    
            if(!success) {
                fail "Failed to create directory $newDir"
            }
    
            newDir
        }
    
        private static File createFile(File parent, String filename) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Dec 27 06:24:30 UTC 2018
    - 4.1K bytes
    - Viewed (0)
  7. pilot/pkg/model/addressmap_test.go

    )
    
    func TestAddressMapLen(t *testing.T) {
    	cases := []struct {
    		name     string
    		newMap   func() *model.AddressMap
    		expected int
    	}{
    		{
    			name: "nil addresses map",
    			newMap: func() *model.AddressMap {
    				return nil
    			},
    			expected: 0,
    		},
    		{
    			name: "empty addresses map",
    			newMap: func() *model.AddressMap {
    				m := model.AddressMap{}
    				m.AddAddressesFor(c1ID, make([]string, 0))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  8. src/internal/fuzz/queue.go

    	elems     []any
    	head, len int
    }
    
    func (q *queue) cap() int {
    	return len(q.elems)
    }
    
    func (q *queue) grow() {
    	oldCap := q.cap()
    	newCap := oldCap * 2
    	if newCap == 0 {
    		newCap = 8
    	}
    	newElems := make([]any, newCap)
    	oldLen := q.len
    	for i := 0; i < oldLen; i++ {
    		newElems[i] = q.elems[(q.head+i)%oldCap]
    	}
    	q.elems = newElems
    	q.head = 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Nov 05 21:02:45 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  9. test/typeparam/issue47877.go

    package main
    
    type Map[K comparable, V any] struct {
            m map[K]V
    }
    
    func NewMap[K comparable, V any]() Map[K, V] {
            return Map[K, V]{m: map[K]V{}}
    }
    
    func (m Map[K, V]) Get(key K) V {
            return m.m[key]
    }
    
    func main() {
            _ = NewMap[int, struct{}]()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 444 bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/map.go

    // license that can be found in the LICENSE file.
    
    package types2
    
    // A Map represents a map type.
    type Map struct {
    	key, elem Type
    }
    
    // NewMap returns a new map for the given key and element types.
    func NewMap(key, elem Type) *Map {
    	return &Map{key: key, elem: elem}
    }
    
    // Key returns the key type of map m.
    func (m *Map) Key() Type { return m.key }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 01 22:17:50 UTC 2021
    - 659 bytes
    - Viewed (0)
Back to top