# M0006 type mismatch (/docs/diagnostics/codes/m0006)

<Diagnostic code="M0006" />

## The mistake and the fix [#the-mistake-and-the-fix]

<div className="code-pair">

```go title="The mistake"
func add(a, b int) int

add(1, "two")
```

```go title="Fixed"
add(1, 2) // [!code highlight]
```

</div>

## The fix [#the-fix]

Convert the value, or change the declaration of the destination.

See also [all error codes](/docs/diagnostics/codes) and [marmot explain](/docs/commands/explain).