| 24 | namespace cel { |
| 25 | |
| 26 | bool FunctionDescriptor::ShapeMatches(bool receiver_style, |
| 27 | absl::Span<const Kind> types) const { |
| 28 | if (this->receiver_style() != receiver_style) { |
| 29 | return false; |
| 30 | } |
| 31 | |
| 32 | if (this->types().size() != types.size()) { |
| 33 | return false; |
| 34 | } |
| 35 | |
| 36 | for (size_t i = 0; i < this->types().size(); i++) { |
| 37 | Kind this_type = this->types()[i]; |
| 38 | Kind other_type = types[i]; |
| 39 | if (this_type != Kind::kAny && other_type != Kind::kAny && |
| 40 | this_type != other_type) { |
| 41 | return false; |
| 42 | } |
| 43 | } |
| 44 | return true; |
| 45 | } |
| 46 | |
| 47 | bool FunctionDescriptor::operator==(const FunctionDescriptor& other) const { |
| 48 | return impl_.get() == other.impl_.get() || |
no test coverage detected