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

Method ShapeMatches

common/function_descriptor.cc:26–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace cel {
25
26bool 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
47bool FunctionDescriptor::operator==(const FunctionDescriptor& other) const {
48 return impl_.get() == other.impl_.get() ||

Callers 8

InsertFunctionMethod · 0.45
RemoveFunctionEntriesMethod · 0.45
GetFunctionMethod · 0.45
FindStaticOverloadsMethod · 0.45
FindLazyOverloadsMethod · 0.45
DescriptorRegisteredMethod · 0.45
InsertFunctionMethod · 0.45

Calls 2

receiver_styleMethod · 0.95
sizeMethod · 0.45

Tested by

no test coverage detected