- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for isGeneric (0.58 sec)
-
src/cmd/compile/internal/types2/context.go
// unnecessary, but we leave it for hash readability. It can be removed later // if performance is an issue. h.typ(orig) if len(targs) > 0 { // TODO(rfindley): consider asserting on isGeneric(typ) here, if and when // isGeneric handles *Signature types. h.typeList(targs) } return strings.ReplaceAll(buf.String(), " ", "#") } // lookup returns an existing instantiation of orig with targs, if it exists.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:29:21 UTC 2023 - 4.3K bytes - Viewed (0) -
src/go/types/context.go
// unnecessary, but we leave it for hash readability. It can be removed later // if performance is an issue. h.typ(orig) if len(targs) > 0 { // TODO(rfindley): consider asserting on isGeneric(typ) here, if and when // isGeneric handles *Signature types. h.typeList(targs) } return strings.ReplaceAll(buf.String(), " ", "#") } // lookup returns an existing instantiation of orig with targs, if it exists.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 4.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typexpr.go
// before any components of e are type-checked. func (check *Checker) definedType(e syntax.Expr, def *TypeName) Type { typ := check.typInternal(e, def) assert(isTyped(typ)) if isGeneric(typ) { check.errorf(e, WrongTypeArgCount, "cannot use generic type %s without instantiation", typ) typ = Typ[Invalid] } check.recordTypeAndValue(e, typexpr, typ, nil) return typ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.6K bytes - Viewed (0) -
src/go/types/typexpr.go
// before any components of e are type-checked. func (check *Checker) definedType(e ast.Expr, def *TypeName) Type { typ := check.typInternal(e, def) assert(isTyped(typ)) if isGeneric(typ) { check.errorf(e, WrongTypeArgCount, "cannot use generic type %s without instantiation", typ) typ = Typ[Invalid] } check.recordTypeAndValue(e, typexpr, typ, nil) return typ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/predicates.go
return iface != nil && iface.tset != nil && iface.tset.IsEmpty() } return false } // isGeneric reports whether a type is a generic, uninstantiated type // (generic signatures are not included). // TODO(gri) should we include signatures or assert that they are not present? func isGeneric(t Type) bool { // A parameterized type is only generic if it doesn't have an instantiation already.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 17.5K bytes - Viewed (0) -
src/go/types/predicates.go
return iface != nil && iface.tset != nil && iface.tset.IsEmpty() } return false } // isGeneric reports whether a type is a generic, uninstantiated type // (generic signatures are not included). // TODO(gri) should we include signatures or assert that they are not present? func isGeneric(t Type) bool { // A parameterized type is only generic if it doesn't have an instantiation already.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 17.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/operand.go
if x.mode == constant_ { if s := x.val.String(); s != expr { buf.WriteByte(' ') buf.WriteString(s) } } // <typ> if hasType { if isValid(x.typ) { var intro string if isGeneric(x.typ) { intro = " of generic type " } else { intro = " of type " } buf.WriteString(intro) WriteType(&buf, x.typ, qf) if tpar, _ := Unalias(x.typ).(*TypeParam); tpar != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 21:17:10 UTC 2024 - 11K bytes - Viewed (0) -
src/go/types/operand.go
if x.mode == constant_ { if s := x.val.String(); s != expr { buf.WriteByte(' ') buf.WriteString(s) } } // <typ> if hasType { if isValid(x.typ) { var intro string if isGeneric(x.typ) { intro = " of generic type " } else { intro = " of type " } buf.WriteString(intro) WriteType(&buf, x.typ, qf) if tpar, _ := Unalias(x.typ).(*TypeParam); tpar != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 21:17:10 UTC 2024 - 11.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
case *TypeName: // If we reach a generic type that is part of a cycle // and we are in a type parameter list, we have a cycle // through a type parameter list, which is invalid. if check.inTParamList && isGeneric(obj.typ) { tparCycle = true break loop } // Determine if the type name is an alias or not. For // package-level objects, use the object map which
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.6K bytes - Viewed (0) -
src/go/types/decl.go
case *TypeName: // If we reach a generic type that is part of a cycle // and we are in a type parameter list, we have a cycle // through a type parameter list, which is invalid. if check.inTParamList && isGeneric(obj.typ) { tparCycle = true break loop } // Determine if the type name is an alias or not. For // package-level objects, use the object map which
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0)