﻿# V7035\. Suspicious property implementation\. Another field should probably be returned or assigned instead\.

The analyzer has detected a property that references a field different from the one specified in the name\.

The example: 

```cpp
class Vector2 {
  constructor() {
    this._x = 0;
    this._y = 0;
  }
  
  get x() { 
    return this._x; 
  }
  
  get y() { 
    return this._x;  // <=
  } 
}
```

In the example, developers tried to declare the `x` and `y` properties to access the `_x` and `_y` fields, but the `y` property returns the wrong field\.

The fixed code:

```cpp
class Vector2 {
  constructor() {
    this._x = 0;
    this._y = 0;
  }
  
  get x() { 
    return this._x; 
  }
  
  get y() { 
    return this._y; // <=
  } 
}
```

The analyzer also issues a warning when the field and method names do not match: 

```cpp
class Rights {
  constructor() {
    this.read = false;
    this.write = false;
  }

  setRead(value) { 
    this.read = value; 
  }
  
  setWrite(value) { 
    this.read = value;   // <=
  } 
}
```