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

Function isBasic

types/predicates.go:26–29  ·  view source on GitHub ↗

isBasic reports whether under(t) is a basic type with the specified info. If t is a type parameter the result is false; i.e., isBasic does not look inside a type parameter.

(t Type, info BasicInfo)

Source from the content-addressed store, hash-verified

24// If t is a type parameter the result is false; i.e.,
25// isBasic does not look inside a type parameter.
26func isBasic(t Type, info BasicInfo) bool {
27 u, _ := under(t).(*Basic)
28 return u != nil && u.info&info != 0
29}
30
31// The allX predicates below report whether t is an X.
32// If t is a type parameter the result is true if isX is true

Callers 10

isBooleanFunction · 0.85
isIntegerFunction · 0.85
isUnsignedFunction · 0.85
isFloatFunction · 0.85
isComplexFunction · 0.85
isNumericFunction · 0.85
isStringFunction · 0.85
isIntegerOrFloatFunction · 0.85
isConstTypeFunction · 0.85
allBasicFunction · 0.85

Calls 1

underFunction · 0.85

Tested by

no test coverage detected