# M0015 redeclared (/docs/diagnostics/codes/m0015)

<Diagnostic code="M0015" />

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

<div className="code-pair">

```go title="The mistake"
func f() {}
func f() {}
```

```go title="Fixed"
func f() {}
func g() {} // [!code highlight]
```

</div>

## The fix [#the-fix]

Rename one of the declarations or remove the duplicate.

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