MCPcopy Create free account
hub / github.com/cel-expr/cel-go / matchOperandTrait

Function matchOperandTrait

common/decls/decls.go:896–898  ·  view source on GitHub ↗
(trait int, arg ref.Val)

Source from the content-addressed store, hash-verified

894}
895
896func matchOperandTrait(trait int, arg ref.Val) bool {
897 return trait == 0 || arg.Type().HasTrait(trait) || types.IsUnknownOrError(arg)
898}
899
900// OverloadOpt is a functional option for configuring a function overload.
901type OverloadOpt func(*OverloadDecl) (*OverloadDecl, error)

Calls 3

IsUnknownOrErrorFunction · 0.92
HasTraitMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected