﻿# V8002\. A variable is assigned to itself\.

The analyzer detected a potential error related to a variable value assigned to itself\.

The example:

```cpp
type User struct {
    name string
}

func (u *User) SetName (name string) {
    name = name
}
```

The `name` parameter is assigned its own value, which is an error\. To fix it, assign the parameter value to the `u.name` field instead:

```cpp
func (u *User) SetName (name string) {
    u.name = name
}
```