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

Function MemberOverload

common/decls/decls.go:622–626  ·  view source on GitHub ↗

MemberOverload defines a new receiver-style overload (or member function) with an overload id, argument types, and result type. Through the use of OverloadOpt options, the overload may also be configured with a binding, an operand trait, and to be non-strict. Note: function bindings should be commo

(overloadID string,
	args []*types.Type, resultType *types.Type,
	opts ...OverloadOpt)

Source from the content-addressed store, hash-verified

620// Note: function bindings should be commonly configured with Overload instances whereas operand traits and
621// strict-ness should be rare occurrences.
622func MemberOverload(overloadID string,
623 args []*types.Type, resultType *types.Type,
624 opts ...OverloadOpt) FunctionOpt {
625 return newOverload(overloadID, true, args, resultType, opts...)
626}
627
628func newOverload(overloadID string,
629 memberFunction bool, args []*types.Type, resultType *types.Type,

Callers 15

testDataFunction · 0.92
testCasesFunction · 0.92
testEnvsFunction · 0.92
MemberOverloadFunction · 0.92
ProtoAsDeclarationFunction · 0.92
initStandardFunction · 0.92
AsFunctionOptionMethod · 0.92
TestFunctionBindingsFunction · 0.70

Calls 1

newOverloadFunction · 0.85

Tested by 15

testDataFunction · 0.74
testCasesFunction · 0.74
testEnvsFunction · 0.74
TestFunctionBindingsFunction · 0.56
TestFunctionMergeFunction · 0.56