| 28 | } |
| 29 | |
| 30 | bool ArrayType::equals(const AbstractType* _rhs) const |
| 31 | { |
| 32 | if (!AbstractType::equals(_rhs)) |
| 33 | return false; |
| 34 | |
| 35 | Q_ASSERT(dynamic_cast<const ArrayType*>(_rhs)); |
| 36 | const auto* rhs = static_cast<const ArrayType*>(_rhs); |
| 37 | |
| 38 | TYPE_D(ArrayType); |
| 39 | if (d->m_dimension != rhs->d_func()->m_dimension) |
| 40 | return false; |
| 41 | |
| 42 | return d->m_elementType == rhs->d_func()->m_elementType; |
| 43 | } |
| 44 | |
| 45 | ArrayType::ArrayType() |
| 46 | : AbstractType(createData<ArrayType>()) |