Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 106 for mkstruct (0.17 sec)

  1. src/go/printer/testdata/alignment.input

    // ----------------------------------------------------------------------------
    // Examples from issue #7335.
    
    func main() {
        z := MyStruct{
            Foo:      "foo",
            Bar:      "bar",
            Name:     "name",
            LongName: "longname",
            Baz:      "baz",
        }
        y := MyStruct{
            Foo:                   "foo",
            Bar:                   "bar",
            NameXX:                "name",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 14 20:40:15 UTC 2018
    - 4.9K bytes
    - Viewed (0)
  2. test/abi/convT64_criteria.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    )
    
    type MyStruct struct {
    	F0 [0]float64
    	F1 byte
    	F2 int16
    	_  struct {
    		F0 uint32
    	}
    }
    
    func main() {
    	p0 := MyStruct{F0: [0]float64{}, F1: byte(27), F2: int16(9887)}
    	fmt.Println(p0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 08 17:44:21 UTC 2021
    - 387 bytes
    - Viewed (0)
  3. test/typeparam/issue50417b.go

    // until we have a more thorough understanding of the
    // implications on the spec. See issue #51576.
    
    /*
    import "fmt"
    
    type MyStruct struct {
    	b1, b2 string
    	E
    }
    
    type E struct {
    	val int
    }
    
    type C interface {
    	~struct {
    		b1, b2 string
    		E
    	}
    }
    
    func f[T C]() T {
    	var x T = T{
    		b1: "a",
    		b2: "b",
    	}
    
    	if got, want := x.b2, "b"; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 09 21:26:42 UTC 2022
    - 921 bytes
    - Viewed (0)
  4. pkg/slices/slices_test.go

    			}
    		})
    	}
    }
    
    // nolint: unused
    type myStruct struct {
    	a, b, c, d string
    	n          int
    }
    
    func makeRandomStructs(n int) []*myStruct {
    	rand.Seed(42) // nolint: staticcheck
    	structs := make([]*myStruct, n)
    	for i := 0; i < n; i++ {
    		structs[i] = &myStruct{n: rand.Intn(n)} // nolint: gosec
    	}
    	return structs
    }
    
    const N = 100_000
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  5. src/testing/quick/quick_test.go

    }
    
    // This tests that ArbitraryValue is working by checking that all the arbitrary
    // values of type MyStruct have x = 42.
    type myStruct struct {
    	x int
    }
    
    func (m myStruct) Generate(r *rand.Rand, _ int) reflect.Value {
    	return reflect.ValueOf(myStruct{x: 42})
    }
    
    func myStructProperty(in myStruct) bool { return in.x == 42 }
    
    func TestCheckProperty(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 12:54:00 UTC 2019
    - 9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go

    	for _, i := range dList.Items {
    		unstruct := &Unstructured{}
    		if err := s.decodeToUnstructured([]byte(i), unstruct); err != nil {
    			return err
    		}
    		// This is hacky. Set the item's Kind and APIVersion to those inferred
    		// from the List.
    		if len(unstruct.GetKind()) == 0 && len(unstruct.GetAPIVersion()) == 0 {
    			unstruct.SetKind(itemKind)
    			unstruct.SetAPIVersion(listAPIVersion)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 20:39:55 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  7. src/cmd/link/internal/ld/dwarf_test.go

    	mustHaveDWARF(t)
    
    	t.Parallel()
    
    	dir := t.TempDir()
    
    	const prog = `package main
    
    import "fmt"
    
    type astruct struct {
    	X int
    }
    
    type bstruct struct {
    	X float32
    }
    
    var globalptr *astruct
    var globalvar astruct
    var bvar0, bvar1, bvar2 bstruct
    
    func main() {
    	fmt.Println(globalptr, globalvar, bvar0, bvar1, bvar2)
    }
    `
    
    	f := gobuild(t, dir, prog, NoOpt)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 01:38:11 UTC 2024
    - 48.6K bytes
    - Viewed (0)
  8. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/KtFirDestructuringDeclarationSymbol.kt

        override val analysisSession: KaFirSession,
    ) : KaDestructuringDeclarationSymbol(), KaFirSymbol<FirVariableSymbol<*>> {
    
        init {
            require(firSymbol.name == SpecialNames.DESTRUCT)
        }
    
        override val psi: KtDestructuringDeclaration
            get() = withValidityAssertion {
                when (val psi = firSymbol.fir.psi) {
                    is KtDestructuringDeclaration -> psi
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/device_compiler_test.cc

      NameAttrList fn;
      fn.set_name("foo");
    
      TF_EXPECT_OK(xla_device_compiler_->CompileIfNeeded(
          options, fn, SampleArgsForAddXY(), XlaCompiler::CompileOptions{},
          DeviceCompileMode::kStrict, profiler_, &compilation_result,
          &xla_executable));
    
      EXPECT_TRUE(compilation_result != nullptr);
      EXPECT_TRUE(xla_executable != nullptr);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  10. src/internal/types/testdata/spec/assignability.go

    	Defined   _Struct
    )
    
    func (Defined) m() int
    
    // proto-variables for tests
    
    var (
    	b _Basic
    	a _Array
    	l _Slice
    	s _Struct
    	p _Pointer
    	f _Func
    	i _Interface
    	m _Map
    	c _Chan
    	d _Struct
    
    	B Basic
    	A Array
    	L Slice
    	S Struct
    	P Pointer
    	F Func
    	I Interface
    	M Map
    	C Chan
    	D Defined
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 5.1K bytes
    - Viewed (0)
Back to top