# XO0539: a place assigned twice in one destructuring assignment

`(a, b) = v` evaluates v, then stores its elements into the places left to right. A place named twice (`(a, a)`, `(p.x, p.x)`, `(xs[i], xs[i])`, compared by their source text) would keep whichever element is stored last, which is almost always a typo for another place. Name each place once, and use `_` for an element to drop. See core 5.2 and decision 0536.

## Example

```xo
fn f() -> Int {
  var a = 0
  var b = 0
  (a, a) = (1, 2)
  a + b
}
```

## Fix

```xo
fn f() -> Int {
  var a = 0
  var b = 0
  (a, b) = (1, 2)
  a + b
}
```

Run `xo explain XO0539` for this text in a terminal, or see
[section 10.6 of the specification](../../spec/core/#106-diagnostic-codes).

