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

Function MemberOverload

common/decls/decls.go:559–563  ·  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

557// Note: function bindings should be commonly configured with Overload instances whereas operand traits and
558// strict-ness should be rare occurrences.
559func MemberOverload(overloadID string,
560 args []*types.Type, resultType *types.Type,
561 opts ...OverloadOpt) FunctionOpt {
562 return newOverload(overloadID, true, args, resultType, opts...)
563}
564
565func newOverload(overloadID string,
566 memberFunction bool, args []*types.Type, resultType *types.Type,

Callers 15

testDataFunction · 0.92
testCasesFunction · 0.92
testEnvsFunction · 0.92
TestCostFunction · 0.92
MemberOverloadFunction · 0.92
ProtoAsDeclarationFunction · 0.92
initFunction · 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
TestCostFunction · 0.74
TestFunctionBindingsFunction · 0.56
TestFunctionMergeFunction · 0.56