| 58 | } |
| 59 | |
| 60 | bool 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. |
no test coverage detected