| 17 | using ::cel::interop_internal::ToLegacyValue; |
| 18 | |
| 19 | bool CelFunction::MatchArguments(absl::Span<const CelValue> arguments) const { |
| 20 | auto types_size = descriptor().types().size(); |
| 21 | |
| 22 | if (types_size != arguments.size()) { |
| 23 | return false; |
| 24 | } |
| 25 | for (size_t i = 0; i < types_size; i++) { |
| 26 | const auto& value = arguments[i]; |
| 27 | CelValue::Type arg_type = descriptor().types()[i]; |
| 28 | if (value.type() != arg_type && arg_type != CelValue::Type::kAny) { |
| 29 | return false; |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | return true; |
| 34 | } |
| 35 | |
| 36 | bool CelFunction::MatchArguments(absl::Span<const cel::Value> arguments) const { |
| 37 | auto types_size = descriptor().types().size(); |