﻿# V7024\. Suspicious sub\-expression in sequence of similar comparisons\.

The analyzer has detected a code fragment that may contain a typo\. A sequence of three or more similar comparisons linked by the \|\| or && operator contains an expression that breaks the pattern of such comparisons\.

The example:

```cpp
if (a.x === b.x && a.y === b.y && a.z === b.y)
```

In the example, properties of the `a` variable are compared with those of the `b` variable\. However, in the `a.z == b.y` expression, different properties are compared\. Most likely, this is a [copy\-paste error](https://pvs-studio.com/en/blog/terms/0068/), and the check should compare the same properties\.

The fixed example:

```cpp
if (a.x === b.x && a.y === b.y && a.z === b.z)
```