- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 41 for isTyped (0.2 sec)
-
src/go/types/predicates.go
func isTypeLit(t Type) bool { switch Unalias(t).(type) { case *Named, *TypeParam: return false } return true } // isTyped reports whether t is typed; i.e., not an untyped // constant or boolean. // Safe to call from types that are not fully set up. func isTyped(t Type) bool { // Alias and named types cannot denote untyped types // so there's no need to call Unalias or under, below. b, _ := t.(*Basic)
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/predicates.go
func isTypeLit(t Type) bool { switch Unalias(t).(type) { case *Named, *TypeParam: return false } return true } // isTyped reports whether t is typed; i.e., not an untyped // constant or boolean. // Safe to call from types that are not fully set up. func isTyped(t Type) bool { // Alias and named types cannot denote untyped types // so there's no need to call Unalias or under, below. b, _ := t.(*Basic)
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/cmd/compile/internal/types2/gcsizes.go
} else { offs = -1 // f.typ or offs is too large } } return offsets } func (s *gcSizes) Sizeof(T Type) int64 { switch t := under(T).(type) { case *Basic: assert(isTyped(T)) k := t.kind if int(k) < len(basicSizes) { if s := basicSizes[k]; s > 0 { return int64(s) } } if k == String { return s.WordSize * 2 } case *Array: n := t.len
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 4.2K bytes - Viewed (0) -
src/go/types/gcsizes.go
} else { offs = -1 // f.typ or offs is too large } } return offsets } func (s *gcSizes) Sizeof(T Type) int64 { switch t := under(T).(type) { case *Basic: assert(isTyped(T)) k := t.kind if int(k) < len(basicSizes) { if s := basicSizes[k]; s > 0 { return int64(s) } } if k == String { return s.WordSize * 2 } case *Array: n := t.len
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/check.go
func (check *Checker) recordCommaOkTypes(x syntax.Expr, a []*operand) { assert(x != nil) assert(len(a) == 2) if a[0].mode == invalid { return } t0, t1 := a[0].typ, a[1].typ assert(isTyped(t0) && isTyped(t1) && (allBoolean(t1) || t1 == universeError)) if m := check.Types; m != nil { for { tv := m[x] assert(tv.Type != nil) // should have been recorded already pos := x.Pos() tv.Type = NewTuple(
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 23.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/const.go
return } // Typed constants must be representable in // their type after each constant operation. // x.typ cannot be a type parameter (type // parameters cannot be constant types). if isTyped(x.typ) { check.representable(x, under(x.typ).(*Basic)) return } // Untyped integer values must not grow arbitrarily. const prec = 512 // 512 is the constant precision
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 7.5K bytes - Viewed (0) -
src/go/types/check.go
func (check *Checker) recordCommaOkTypes(x ast.Expr, a []*operand) { assert(x != nil) assert(len(a) == 2) if a[0].mode == invalid { return } t0, t1 := a[0].typ, a[1].typ assert(isTyped(t0) && isTyped(t1) && (allBoolean(t1) || t1 == universeError)) if m := check.Types; m != nil { for { tv := m[x] assert(tv.Type != nil) // should have been recorded already pos := x.Pos() tv.Type = NewTuple(
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 23.1K 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/go/types/const.go
return } // Typed constants must be representable in // their type after each constant operation. // x.typ cannot be a type parameter (type // parameters cannot be constant types). if isTyped(x.typ) { check.representable(x, under(x.typ).(*Basic)) return } // Untyped integer values must not grow arbitrarily. const prec = 512 // 512 is the constant precision
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 7.6K bytes - Viewed (0)