MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / allBasic

Function allBasic

types/predicates.go:49–54  ·  view source on GitHub ↗

allBasic reports whether under(t) is a basic type with the specified info. If t is a type parameter, the result is true if isBasic(t, info) is true for all specific types of the type parameter's type set. allBasic(t, info) is an optimized version of isBasic(coreType(t), info).

(t Type, info BasicInfo)

Source from the content-addressed store, hash-verified

47// for all specific types of the type parameter's type set.
48// allBasic(t, info) is an optimized version of isBasic(coreType(t), info).
49func allBasic(t Type, info BasicInfo) bool {
50 if tpar, _ := t.(*TypeParam); tpar != nil {
51 return tpar.is(func(t *term) bool { return t != nil && isBasic(t.typ, info) })
52 }
53 return isBasic(t, info)
54}
55
56// hasName reports whether t has a name. This includes
57// predeclared types, defined types, and type parameters.

Callers 8

allBooleanFunction · 0.85
allIntegerFunction · 0.85
allUnsignedFunction · 0.85
allNumericFunction · 0.85
allStringFunction · 0.85
allOrderedFunction · 0.85
allNumericOrStringFunction · 0.85
recordTypeAndValueMethod · 0.85

Calls 2

isBasicFunction · 0.85
isMethod · 0.45

Tested by

no test coverage detected