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

Function Overload

common/decls/decls.go:610–614  ·  view source on GitHub ↗

Overload defines a new global overload 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 commonly configured with Overload instan

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

Source from the content-addressed store, hash-verified

608// Note: function bindings should be commonly configured with Overload instances whereas operand traits and
609// strict-ness should be rare occurrences.
610func Overload(overloadID string,
611 args []*types.Type, resultType *types.Type,
612 opts ...OverloadOpt) FunctionOpt {
613 return newOverload(overloadID, false, args, resultType, opts...)
614}
615
616// MemberOverload defines a new receiver-style overload (or member function) with an overload id, argument types,
617// and result type. Through the use of OverloadOpt options, the overload may also be configured with a binding,

Callers 15

optionalDeclsFunction · 0.92
testDataFunction · 0.92
testCasesFunction · 0.92
testEnvsFunction · 0.92
TestOverlappingMacroFunction · 0.92
OverloadFunction · 0.92
ProtoAsDeclarationFunction · 0.92
buildZeroArgAsyncFunction · 0.92
initStandardFunction · 0.92

Calls 1

newOverloadFunction · 0.85

Tested by 15

optionalDeclsFunction · 0.74
testDataFunction · 0.74
testCasesFunction · 0.74
testEnvsFunction · 0.74
TestOverlappingMacroFunction · 0.74
buildZeroArgAsyncFunction · 0.74
TestSubsetFunctionFunction · 0.74