- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 5,019 for types2 (0.14 sec)
-
src/cmd/compile/internal/types2/operand.go
return newType != nil, IncompatibleAssign } // Vu is typed // x's type V and T have identical underlying types // and at least one of V or T is not a named type // and neither V nor T is a type parameter. if Identical(Vu, Tu) && (!hasName(V) || !hasName(T)) && Vp == nil && Tp == nil { return true, 0 } // T is an interface type, but not a type parameter, and V implements T.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 21:17:10 UTC 2024 - 11K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typelists.go
if l == nil { return nil } return l.tparams } // TypeList holds a list of types. type TypeList struct{ types []Type } // newTypeList returns a new TypeList with the types in list. func newTypeList(list []Type) *TypeList { if len(list) == 0 { return nil } return &TypeList{list} } // Len returns the number of types in the list. // It is safe to call on a nil receiver.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 28 22:21:55 UTC 2022 - 1.8K bytes - Viewed (0) -
src/go/types/context_test.go
// These lookups and updates use reasonable looking types in an attempt to // make them robust to internal type assertions, but could equally well use // arbitrary types. // Create some distinct origin types. nullaryP and nullaryQ have no // parameters and are identical (but have different type parameter names). // unaryP has a parameter. var nullaryP, nullaryQ, unaryP Type { // type nullaryP = func[P any]()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 2.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/context_test.go
// These lookups and updates use reasonable looking types in an attempt to // make them robust to internal type assertions, but could equally well use // arbitrary types. // Create some distinct origin types. nullaryP and nullaryQ have no // parameters and are identical (but have different type parameter names). // unaryP has a parameter. var nullaryP, nullaryQ, unaryP Type { // type nullaryP = func[P any]()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 17 04:32:02 UTC 2021 - 2.3K bytes - Viewed (0) -
test/typeparam/builtins.go
// This file tests built-in calls on generic types. // derived and expanded from cmd/compile/internal/types2/testdata/check/builtins.go2 package builtins // close type C0 interface{ int } type C1 interface{ chan int } type C2 interface{ chan int | <-chan int } type C3 interface{ chan int | chan float32 } type C4 interface{ chan int | chan<- int } type C5[T any] interface{ ~chan T | chan<- T }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 09:04:48 UTC 2024 - 1.8K bytes - Viewed (0) -
src/cmd/compile/internal/types/size.go
continue } CheckSize(m.Type) addMethod(m, true) } for _, m := range t.Methods() { if m.Sym != nil || m.Type == nil { continue } // In 1.18, embedded types can be anything. In Go 1.17, we disallow // embedding anything other than interfaces. This requirement was caught // by types2 already, so allow non-interface here. if !m.Type.IsInterface() { continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 15K bytes - Viewed (0) -
src/cmd/compile/internal/types2/errors.go
} panic(msg) } } // An errorDesc describes part of a type-checking error. type errorDesc struct { pos syntax.Pos msg string } // An error_ represents a type-checking error. // A new error_ is created with Checker.newError. // To report an error_, call error_.report. type error_ struct { check *Checker desc []errorDesc code Code
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/under.go
// type of all types in its type set if it exists, or nil otherwise. If the // type set contains only unrestricted and restricted channel types (with // identical element types), the single underlying type is the restricted // channel type if the restrictions are always the same, or nil otherwise. func coreType(t Type) Type { t = Unalias(t) tpar, _ := t.(*TypeParam) if tpar == nil { return under(t)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 22:34:27 UTC 2024 - 2.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/package.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 types2 import ( "fmt" ) // A Package describes a Go package. type Package struct { path string name string scope *Scope imports []*Package complete bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 06 13:09:19 UTC 2023 - 2.9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typeset_test.go
"{E}; type E interface{}": "𝓤", "{E}; type E interface{int;string}": "∅", "{E}; type E interface{comparable}": "{comparable}", } { // parse errh := func(error) {} // dummy error handler so that parsing continues in presence of errors src := "package p; type T interface" + body file, err := syntax.Parse(nil, strings.NewReader(src), errh, nil, 0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 07 21:37:14 UTC 2022 - 2.4K bytes - Viewed (0)