(rhs)
| 10392 | return this.kind() === rhs.kind(); |
| 10393 | } |
| 10394 | isSubtypeOf(rhs) { |
| 10395 | if (rhs.kind() === 'AnyType' || this === rhs) { |
| 10396 | return true; |
| 10397 | } |
| 10398 | if (rhs instanceof torch.OptionalType && this instanceof torch.OptionalType === false) { |
| 10399 | return this.isSubtypeOf(rhs.getElementType()); |
| 10400 | } |
| 10401 | if (rhs instanceof torch.UnionType) { |
| 10402 | return rhs.containedTypes().some((inner) => this.isSubtypeOf(inner)); |
| 10403 | } |
| 10404 | if (rhs instanceof torch._C.DynamicType) { |
| 10405 | return torch._C.DynamicType.create(this).isSubtypeOf(rhs); |
| 10406 | } |
| 10407 | return this.equals(rhs); |
| 10408 | } |
| 10409 | containedTypes() { |
| 10410 | return []; |
| 10411 | } |
no test coverage detected