MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / ArgumentKindsMatch

Function ArgumentKindsMatch

eval/eval/function_step.cc:60–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60bool ArgumentKindsMatch(const cel::FunctionDescriptor& descriptor,
61 absl::Span<const cel::Value> arguments) {
62 auto types_size = descriptor.types().size();
63
64 if (types_size != arguments.size()) {
65 return false;
66 }
67
68 for (size_t i = 0; i < types_size; i++) {
69 const auto& arg = arguments[i];
70 cel::Kind param_kind = descriptor.types()[i];
71 if (arg->kind() != param_kind && param_kind != cel::Kind::kAny) {
72 return false;
73 }
74 }
75
76 return true;
77}
78
79// Adjust new type names to legacy equivalent. int -> int64.
80// Temporary fix to migrate value types without breaking clients.

Callers 2

ResolveStaticFunction · 0.85
ResolveLazyFunction · 0.85

Calls 2

sizeMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected