| 387 | } |
| 388 | |
| 389 | bool InputType::Equals(const InputType& other) const { |
| 390 | if (this == &other) { |
| 391 | return true; |
| 392 | } |
| 393 | if (kind_ != other.kind_) { |
| 394 | return false; |
| 395 | } |
| 396 | switch (kind_) { |
| 397 | case InputType::ANY_TYPE: |
| 398 | return true; |
| 399 | case InputType::EXACT_TYPE: |
| 400 | return type_->Equals(*other.type_); |
| 401 | case InputType::USE_TYPE_MATCHER: |
| 402 | return type_matcher_->Equals(*other.type_matcher_); |
| 403 | } |
| 404 | return false; |
| 405 | } |
| 406 | |
| 407 | bool InputType::Matches(const DataType& type) const { |
| 408 | switch (kind_) { |